rhogallery 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,12 +1,12 @@
1
1
  source "http://rubygems.org"
2
2
 
3
3
  gemspec
4
- gem 'rake'
4
+ gem 'rake', '~>0.9.2'
5
5
  gem 'rest-client'
6
6
  gem 'json'
7
7
 
8
8
  group :test do
9
- gem 'rspec', '~>2.5.0', :require => 'spec'
10
- gem 'rcov', '~>0.9.8'
9
+ gem 'rspec', '~>2.8.0', :require => 'spec'
10
+ gem 'simplecov', :require => false
11
11
  gem 'webmock'
12
12
  end
@@ -120,6 +120,16 @@ and you can delete it too :)
120
120
 
121
121
  consumer.delete
122
122
  => true
123
+
124
+ ##Add a Consumer to Group(s)
125
+
126
+ You can set the group(s) for a consumer by setting in comma separated the list of groups.
127
+
128
+ consumer = RhoGallery::Consumer.new({:login => "somelogin", :tags => "group1,group2,group3"})
129
+ consumer.save
130
+ => true
131
+
132
+ If the group already exist, it will just add this consumer to that group, but if doesn't exist it will create the group and the consumer will be added to that group.
123
133
 
124
134
  ##See Errors
125
135
 
@@ -69,9 +69,9 @@ class RhoGallery::Base
69
69
  if method_sym.to_s.slice("=")
70
70
  att = method_sym.to_s.split("=").first.strip
71
71
  if @attributes[att.to_sym]
72
- @attributes[att.to_sym] = arguments.to_s
72
+ @attributes[att.to_sym] = arguments.join
73
73
  else
74
- @attributes.merge!({att.to_sym => arguments.to_s})
74
+ @attributes.merge!({att.to_sym => arguments.join})
75
75
  end
76
76
  else
77
77
  att = @attributes[method_sym]
@@ -1,3 +1,3 @@
1
1
  module Rhogallery
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -1,3 +1,6 @@
1
+ require 'simplecov'
2
+ SimpleCov.start
3
+
1
4
  $:.unshift File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
2
5
  require 'rhogallery'
3
6
  require 'rspec'
@@ -10,7 +13,7 @@ class SpecHelpers
10
13
  ENV['rhogallery_username'] = "testuser"
11
14
  ENV['rhogallery_token'] = "some_uuid_token"
12
15
  WebMock.disable_net_connect!
13
- #gorups collection
16
+ #groups collection
14
17
  @rhomobile_group = ({:name => "rhomobile", :id => "4e6146d5bdd0c8048c000005"})
15
18
  @koombea_group = ({:name => "koombea", :id => "4e6146d5bdd0c8048c000004"})
16
19
  #consumers collection
metadata CHANGED
@@ -1,64 +1,55 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rhogallery
3
- version: !ruby/object:Gem::Version
4
- hash: 31
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.3
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 1
9
- - 2
10
- version: 0.1.2
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Rhomobile
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-10-05 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2012-06-13 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: json
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 1.5.4
21
22
  type: :runtime
22
23
  prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
24
25
  none: false
25
- requirements:
26
+ requirements:
26
27
  - - ~>
27
- - !ruby/object:Gem::Version
28
- hash: 11
29
- segments:
30
- - 1
31
- - 5
32
- - 4
28
+ - !ruby/object:Gem::Version
33
29
  version: 1.5.4
34
- version_requirements: *id001
35
- name: json
36
- - !ruby/object:Gem::Dependency
30
+ - !ruby/object:Gem::Dependency
31
+ name: rest-client
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: 1.6.6
37
38
  type: :runtime
38
39
  prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
40
41
  none: false
41
- requirements:
42
+ requirements:
42
43
  - - ~>
43
- - !ruby/object:Gem::Version
44
- hash: 3
45
- segments:
46
- - 1
47
- - 6
48
- - 6
44
+ - !ruby/object:Gem::Version
49
45
  version: 1.6.6
50
- version_requirements: *id002
51
- name: rest-client
52
- description: "RhoGallery api client "
53
- email:
46
+ description: ! 'RhoGallery api client '
47
+ email:
54
48
  - support@rhomobile.com
55
49
  executables: []
56
-
57
50
  extensions: []
58
-
59
51
  extra_rdoc_files: []
60
-
61
- files:
52
+ files:
62
53
  - .gitignore
63
54
  - Gemfile
64
55
  - Gemfile.lock
@@ -78,38 +69,32 @@ files:
78
69
  - spec/spec_helper.rb
79
70
  homepage: http://rhomobile.com
80
71
  licenses: []
81
-
82
72
  post_install_message:
83
73
  rdoc_options: []
84
-
85
- require_paths:
74
+ require_paths:
86
75
  - lib
87
- required_ruby_version: !ruby/object:Gem::Requirement
76
+ required_ruby_version: !ruby/object:Gem::Requirement
88
77
  none: false
89
- requirements:
90
- - - ">="
91
- - !ruby/object:Gem::Version
92
- hash: 3
93
- segments:
78
+ requirements:
79
+ - - ! '>='
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ segments:
94
83
  - 0
95
- version: "0"
96
- required_rubygems_version: !ruby/object:Gem::Requirement
84
+ hash: 2679679830399641448
85
+ required_rubygems_version: !ruby/object:Gem::Requirement
97
86
  none: false
98
- requirements:
99
- - - ">="
100
- - !ruby/object:Gem::Version
101
- hash: 3
102
- segments:
103
- - 0
104
- version: "0"
87
+ requirements:
88
+ - - ! '>='
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
105
91
  requirements: []
106
-
107
92
  rubyforge_project:
108
- rubygems_version: 1.8.10
93
+ rubygems_version: 1.8.24
109
94
  signing_key:
110
95
  specification_version: 3
111
96
  summary: RhoGallery client
112
- test_files:
97
+ test_files:
113
98
  - spec/consumer_spec.rb
114
99
  - spec/group_spec.rb
115
100
  - spec/rho_gallery_spec.rb