ruby-redtail 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
 - data/VERSION +1 -1
 - data/lib/ruby-redtail/taggroup.rb +14 -0
 - data/lib/ruby-redtail/user/settings.rb +12 -0
 - data/ruby-redtail.gemspec +3 -2
 - data/test/user_settings_test.rb +1 -1
 - metadata +2 -1
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,15 +1,15 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            !binary "U0hBMQ==":
         
     | 
| 
       3 
3 
     | 
    
         
             
              metadata.gz: !binary |-
         
     | 
| 
       4 
     | 
    
         
            -
                 
     | 
| 
      
 4 
     | 
    
         
            +
                MmFhZWFmMDY3OTU1MTdjODU0MGZkZWYwNDI5Mzg2ZmY5ZTJiZDA0ZQ==
         
     | 
| 
       5 
5 
     | 
    
         
             
              data.tar.gz: !binary |-
         
     | 
| 
       6 
     | 
    
         
            -
                 
     | 
| 
      
 6 
     | 
    
         
            +
                ODY3OWIyNzE1ZjkyZmU4YmY1MjIyYWE5Yjg5ZjRhMmRlY2MwZTEzNg==
         
     | 
| 
       7 
7 
     | 
    
         
             
            SHA512:
         
     | 
| 
       8 
8 
     | 
    
         
             
              metadata.gz: !binary |-
         
     | 
| 
       9 
     | 
    
         
            -
                 
     | 
| 
       10 
     | 
    
         
            -
                 
     | 
| 
       11 
     | 
    
         
            -
                 
     | 
| 
      
 9 
     | 
    
         
            +
                MmQ2YjIxNmEwNTQ2YWFlODRhYWE1YjBjYWU5YmRiYTY0YjdiN2MyY2Q0MGM1
         
     | 
| 
      
 10 
     | 
    
         
            +
                ZWYzYzIxMDMxZTNhNzE2YWM0NGI2ODFhMzdlZDY0MDY1ZTkzYzFhZDgzMTNj
         
     | 
| 
      
 11 
     | 
    
         
            +
                YzIyZGRhZjI3YmE3YjAyYjg5MjYxNjRiZGU5ZmI0MjM2MDM3OTY=
         
     | 
| 
       12 
12 
     | 
    
         
             
              data.tar.gz: !binary |-
         
     | 
| 
       13 
     | 
    
         
            -
                 
     | 
| 
       14 
     | 
    
         
            -
                 
     | 
| 
       15 
     | 
    
         
            -
                 
     | 
| 
      
 13 
     | 
    
         
            +
                OWI0MjRkMjc5NTZkZTJkYmU4NmI0N2Y0MzI5NjMwMzliYTU5M2ViZWExZmY0
         
     | 
| 
      
 14 
     | 
    
         
            +
                NDI0NDk3MjQ5YTE1NTBmMjA5ZGU1MmE1ZTUxY2UxMTA1M2U3YzgxY2M2YjUz
         
     | 
| 
      
 15 
     | 
    
         
            +
                ODNkZjZlYmU1YmJiNGU1Y2ViNGY5OTEzNmUzZGE3ZDQ4NGUxMDk=
         
     | 
    
        data/VERSION
    CHANGED
    
    | 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            0. 
     | 
| 
      
 1 
     | 
    
         
            +
            0.3.0
         
     | 
| 
         @@ -0,0 +1,14 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module RubyRedtail
         
     | 
| 
      
 2 
     | 
    
         
            +
              class Taggroup
         
     | 
| 
      
 3 
     | 
    
         
            +
                def initialize(setting = {},api_hash)
         
     | 
| 
      
 4 
     | 
    
         
            +
                  @api_hash = api_hash
         
     | 
| 
      
 5 
     | 
    
         
            +
                  
         
     | 
| 
      
 6 
     | 
    
         
            +
                  raise ArgumentError if setting.class != Hash
         
     | 
| 
      
 7 
     | 
    
         
            +
                  setting.each do |key, value|
         
     | 
| 
      
 8 
     | 
    
         
            +
                    key = key.underscore
         
     | 
| 
      
 9 
     | 
    
         
            +
                    self.class.send :attr_accessor, key
         
     | 
| 
      
 10 
     | 
    
         
            +
                    instance_variable_set "@#{key}", value
         
     | 
| 
      
 11 
     | 
    
         
            +
                  end
         
     | 
| 
      
 12 
     | 
    
         
            +
                end
         
     | 
| 
      
 13 
     | 
    
         
            +
              end
         
     | 
| 
      
 14 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -91,6 +91,18 @@ module RubyRedtail 
     | 
|
| 
       91 
91 
     | 
    
         
             
                      raise RubyRedtail::AuthenticationError
         
     | 
| 
       92 
92 
     | 
    
         
             
                    end
         
     | 
| 
       93 
93 
     | 
    
         
             
                  end
         
     | 
| 
      
 94 
     | 
    
         
            +
                  
         
     | 
| 
      
 95 
     | 
    
         
            +
                  def build_taggroup taggroup_hash
         
     | 
| 
      
 96 
     | 
    
         
            +
                    RubyRedtail::Taggroup.new(taggroup_hash,@api_hash)
         
     | 
| 
      
 97 
     | 
    
         
            +
                  end
         
     | 
| 
      
 98 
     | 
    
         
            +
             
     | 
| 
      
 99 
     | 
    
         
            +
                  def build_taggroups_array taggroup_hashes
         
     | 
| 
      
 100 
     | 
    
         
            +
                    if taggroup_hashes
         
     | 
| 
      
 101 
     | 
    
         
            +
                      taggroup_hashes.collect { |taggroup_hash| self.build_taggroup taggroup_hash }
         
     | 
| 
      
 102 
     | 
    
         
            +
                    else
         
     | 
| 
      
 103 
     | 
    
         
            +
                      raise RubyRedtail::AuthenticationError
         
     | 
| 
      
 104 
     | 
    
         
            +
                    end
         
     | 
| 
      
 105 
     | 
    
         
            +
                  end
         
     | 
| 
       94 
106 
     | 
    
         | 
| 
       95 
107 
     | 
    
         
             
                end
         
     | 
| 
       96 
108 
     | 
    
         
             
              end
         
     | 
    
        data/ruby-redtail.gemspec
    CHANGED
    
    | 
         @@ -2,11 +2,11 @@ 
     | 
|
| 
       2 
2 
     | 
    
         
             
            # DO NOT EDIT THIS FILE DIRECTLY
         
     | 
| 
       3 
3 
     | 
    
         
             
            # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
         
     | 
| 
       4 
4 
     | 
    
         
             
            # -*- encoding: utf-8 -*-
         
     | 
| 
       5 
     | 
    
         
            -
            # stub: ruby-redtail 0. 
     | 
| 
      
 5 
     | 
    
         
            +
            # stub: ruby-redtail 0.3.0 ruby lib
         
     | 
| 
       6 
6 
     | 
    
         | 
| 
       7 
7 
     | 
    
         
             
            Gem::Specification.new do |s|
         
     | 
| 
       8 
8 
     | 
    
         
             
              s.name = "ruby-redtail"
         
     | 
| 
       9 
     | 
    
         
            -
              s.version = "0. 
     | 
| 
      
 9 
     | 
    
         
            +
              s.version = "0.3.0"
         
     | 
| 
       10 
10 
     | 
    
         | 
| 
       11 
11 
     | 
    
         
             
              s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
         
     | 
| 
       12 
12 
     | 
    
         
             
              s.authors = ["Nathan Colgate"]
         
     | 
| 
         @@ -40,6 +40,7 @@ Gem::Specification.new do |s| 
     | 
|
| 
       40 
40 
     | 
    
         
             
                "lib/ruby-redtail/query.rb",
         
     | 
| 
       41 
41 
     | 
    
         
             
                "lib/ruby-redtail/setting.rb",
         
     | 
| 
       42 
42 
     | 
    
         
             
                "lib/ruby-redtail/sso.rb",
         
     | 
| 
      
 43 
     | 
    
         
            +
                "lib/ruby-redtail/taggroup.rb",
         
     | 
| 
       43 
44 
     | 
    
         
             
                "lib/ruby-redtail/user.rb",
         
     | 
| 
       44 
45 
     | 
    
         
             
                "lib/ruby-redtail/user/contacts.rb",
         
     | 
| 
       45 
46 
     | 
    
         
             
                "lib/ruby-redtail/user/settings.rb",
         
     | 
    
        data/test/user_settings_test.rb
    CHANGED
    
    | 
         @@ -33,7 +33,7 @@ class UserSettingsTest < Test::Unit::TestCase 
     | 
|
| 
       33 
33 
     | 
    
         
             
              should "be able to fetch user taggroups" do
         
     | 
| 
       34 
34 
     | 
    
         
             
                taggroups = @user.settings.taggroups
         
     | 
| 
       35 
35 
     | 
    
         
             
                assert_equal(Array, taggroups.class)
         
     | 
| 
       36 
     | 
    
         
            -
                assert_equal(RubyRedtail:: 
     | 
| 
      
 36 
     | 
    
         
            +
                assert_equal(RubyRedtail::Taggroup, taggroups.first.class)
         
     | 
| 
       37 
37 
     | 
    
         
             
              end
         
     | 
| 
       38 
38 
     | 
    
         | 
| 
       39 
39 
     | 
    
         
             
              should "be able to fetch user csl" do
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: ruby-redtail
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.3.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Nathan Colgate
         
     | 
| 
         @@ -138,6 +138,7 @@ files: 
     | 
|
| 
       138 
138 
     | 
    
         
             
            - lib/ruby-redtail/query.rb
         
     | 
| 
       139 
139 
     | 
    
         
             
            - lib/ruby-redtail/setting.rb
         
     | 
| 
       140 
140 
     | 
    
         
             
            - lib/ruby-redtail/sso.rb
         
     | 
| 
      
 141 
     | 
    
         
            +
            - lib/ruby-redtail/taggroup.rb
         
     | 
| 
       141 
142 
     | 
    
         
             
            - lib/ruby-redtail/user.rb
         
     | 
| 
       142 
143 
     | 
    
         
             
            - lib/ruby-redtail/user/contacts.rb
         
     | 
| 
       143 
144 
     | 
    
         
             
            - lib/ruby-redtail/user/settings.rb
         
     |