just_share 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/just_share/string.rb +5 -0
- data/lib/just_share/version.rb +1 -1
- data/lib/just_share.rb +3 -0
- data/spec/just_share/just_share_spec.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4cf337c2f2e7a7f6015fb6ece7fa380735bc9f33
|
4
|
+
data.tar.gz: c32f763f0a332cd0e4e02a66c19d054602b7abe7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2a055b30693b203b84b708dee0bf2903154fe9a7859873880a8a27c80134024b29e9075c7286ebc2ac71f96e24795e2b9814cbdbc26a58df12d5a01783524e3
|
7
|
+
data.tar.gz: f3f597fa92e9d18c0825e1172a3334bd996ae4d0c1829a07e2cb414b9d44a88e090dd3da4269b465755663537e77afd3fecc709755a107c3e09ebc2a0add31a9
|
data/Gemfile.lock
CHANGED
data/lib/just_share/string.rb
CHANGED
data/lib/just_share/version.rb
CHANGED
data/lib/just_share.rb
CHANGED
@@ -36,8 +36,11 @@ module JustShare
|
|
36
36
|
|
37
37
|
# Convert it array to a simple String to be a GET HTTP param
|
38
38
|
def self.array_to_str_params input_array
|
39
|
+
aux_array = input_array.split(',') if input_array.is_a?String
|
40
|
+
if aux_array.is_a?String then return input_array elsif !aux_array.nil? then input_array = aux_array end
|
39
41
|
return_str = '' # init
|
40
42
|
input_array.each { |item| return_str="#{return_str}#{item}," }
|
43
|
+
return_str = return_str.chomp(',') if return_str.last == ','
|
41
44
|
return_str # return
|
42
45
|
end
|
43
46
|
|
@@ -60,6 +60,7 @@ describe JustShare do
|
|
60
60
|
@url_generated = JustShare.on(@base_hash)
|
61
61
|
puts @url_generated
|
62
62
|
expect(@url_generated).to be_equals @twitter_expected_url
|
63
|
+
expect(@url_generated.last).to_not be_equals ','
|
63
64
|
#expect(accessible?(@url_generated)).to be_truthy
|
64
65
|
end
|
65
66
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: just_share
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilton Garcia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|