badgeville 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -37
- data/CHANGELOG.md +6 -1
- data/Gemfile.lock +1 -1
- data/lib/badgeville/reward.rb +1 -1
- data/lib/badgeville/version.rb +1 -1
- data/spec/reward_spec.rb +8 -1
- metadata +14 -14
data/.gitignore
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
*.gem
|
1
2
|
examples/my*
|
2
3
|
# rcov generated
|
3
4
|
coverage
|
@@ -12,42 +13,6 @@ doc
|
|
12
13
|
# bundler
|
13
14
|
.bundle
|
14
15
|
|
15
|
-
# jeweler generated
|
16
|
-
pkg
|
17
|
-
|
18
16
|
keys.json
|
19
|
-
|
20
|
-
# Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
|
21
|
-
#
|
22
|
-
# * Create a file at ~/.gitignore
|
23
|
-
# * Include files you want ignored
|
24
|
-
# * Run: git config --global core.excludesfile ~/.gitignore
|
25
|
-
#
|
26
|
-
# After doing this, these files will be ignored in all your git projects,
|
27
|
-
# saving you from having to 'pollute' every project you touch with them
|
28
|
-
#
|
29
|
-
# Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
|
30
|
-
#
|
31
|
-
# For MacOS:
|
32
|
-
#
|
33
|
-
#.DS_Store
|
34
|
-
|
35
|
-
# For TextMate
|
36
|
-
#*.tmproj
|
37
|
-
#tmtags
|
38
|
-
|
39
|
-
# For emacs:
|
40
|
-
#*~
|
41
|
-
#\#*
|
42
|
-
#.\#*
|
43
|
-
|
44
|
-
# For vim:
|
45
|
-
#*.swp
|
46
|
-
|
47
|
-
# For redcar:
|
48
|
-
#.redcar
|
49
|
-
|
50
|
-
# For rubinius:
|
51
|
-
#*.rbc
|
52
17
|
keys.json.dev
|
53
|
-
keys.json.pro
|
18
|
+
keys.json.pro
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/badgeville/reward.rb
CHANGED
@@ -46,7 +46,7 @@ module Badgeville
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def image_url(format = :original)
|
49
|
-
@image_url.sub('original', format.to_s).sub(/^https?:/, '')
|
49
|
+
@image_url.sub('original', format.to_s).sub(/^https?:/, '') if @image_url
|
50
50
|
end
|
51
51
|
|
52
52
|
# <b>DEPRECATED:</b> Please use <tt>image_url('grayscale')</tt> instead.
|
data/lib/badgeville/version.rb
CHANGED
data/spec/reward_spec.rb
CHANGED
@@ -63,7 +63,14 @@ describe Badgeville::Reward do
|
|
63
63
|
@parsed_json['image_url'] = 'https://s3.amazon.com/original.png?1'
|
64
64
|
reward = Badgeville::Reward.new(@parsed_json)
|
65
65
|
|
66
|
-
|
66
|
+
reward.image_url.should == '//s3.amazon.com/original.png?1'
|
67
|
+
end
|
68
|
+
|
69
|
+
it "returns nil if the image url is nil in the parsed json" do
|
70
|
+
@parsed_json['image_url'] = nil
|
71
|
+
reward = Badgeville::Reward.new(@parsed_json)
|
72
|
+
|
73
|
+
reward.image_url.should be_nil
|
67
74
|
end
|
68
75
|
end
|
69
76
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: badgeville
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-05-
|
13
|
+
date: 2012-05-07 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rest-client
|
17
|
-
requirement: &
|
17
|
+
requirement: &70228496543680 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: '0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70228496543680
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: json
|
28
|
-
requirement: &
|
28
|
+
requirement: &70228496543080 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ! '>='
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *70228496543080
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: bundler
|
39
|
-
requirement: &
|
39
|
+
requirement: &70228496542440 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ! '>='
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
version: '0'
|
45
45
|
type: :development
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *70228496542440
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: rspec
|
50
|
-
requirement: &
|
50
|
+
requirement: &70228496541900 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ! '>='
|
@@ -55,10 +55,10 @@ dependencies:
|
|
55
55
|
version: '0'
|
56
56
|
type: :development
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *70228496541900
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: rdoc
|
61
|
-
requirement: &
|
61
|
+
requirement: &70228496541480 !ruby/object:Gem::Requirement
|
62
62
|
none: false
|
63
63
|
requirements:
|
64
64
|
- - ! '>='
|
@@ -66,10 +66,10 @@ dependencies:
|
|
66
66
|
version: '0'
|
67
67
|
type: :development
|
68
68
|
prerelease: false
|
69
|
-
version_requirements: *
|
69
|
+
version_requirements: *70228496541480
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: webmock
|
72
|
-
requirement: &
|
72
|
+
requirement: &70228496541060 !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
75
|
- - ! '>='
|
@@ -77,7 +77,7 @@ dependencies:
|
|
77
77
|
version: '0'
|
78
78
|
type: :development
|
79
79
|
prerelease: false
|
80
|
-
version_requirements: *
|
80
|
+
version_requirements: *70228496541060
|
81
81
|
description: Badgeville API client
|
82
82
|
email:
|
83
83
|
executables: []
|