Code Monkey home page Code Monkey logo

spirit's People

Contributors

bruienne avatar grahamgilbert avatar mosen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spirit's Issues

CFPropertyList require should be lower case?

When trying to run rackup after following the installation instructions I encountered errors with code requiring the CFPropertyList gem. On both a clean Ruby 2.1.x and Ruby 1.9.7 VM I got the following error:

root@fa2af62d2fce:/spirit# rackup
/var/lib/gems/1.9.1/gems/backports-3.4.1/lib/backports/tools.rb:343:in `require': cannot load such file -- CFPropertyList (LoadError)

Some Googling suggested that changing the require statement to all lower case resolves this, and it did in my case. Not sure if this is masking some other problem but since these were completely clean and bare VMs and Ruby installs I wanted to point it out.

Handle invalid plists

Just started by dropping in my entire Computers DB, which apparently has some plists that are just empty files. When reading one of these failed, the rest of the entries wouldn't be sent.

Below is how I wrapped the call for this case of reading a plist, but then I realized this would probably be better abstracted out of each case where plists are read, maybe into PlistModel. So I'm just logging this issue here, not sure how you would prefer to handle this.

diff --git a/lib/spirit/computer.rb b/lib/spirit/computer.rb
index abe8e4b..c66ad13 100644
--- a/lib/spirit/computer.rb
+++ b/lib/spirit/computer.rb
@@ -32,10 +32,14 @@ module Spirit
           next if entry == 'group.settings.plist'

           full_path = File.join(@path, entry)
-
-          computer = CFPropertyList::List.new(:file => full_path)
-          computer_hash = CFPropertyList.native_types(computer.value)
-          computers['computers'][computer_hash[@primary_key]] = computer_hash
+          begin
+            computer = CFPropertyList::List.new(:file => full_path)
+            computer_hash = CFPropertyList.native_types(computer.value)
+            computers['computers'][computer_hash[@primary_key]] = computer_hash
+          rescue Exception => e
+            logger.debug e.message
+            next
+          end
         end

Can't change filename of scripts

When creating a script it is not possible to change the name of the script, attempts to name the script revert to the default name given by DS Admin. I will post a log trace in a bit when I can get at one.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.