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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1ea6c057971aba6f9931e17c943c5975a5df9565
4
- data.tar.gz: 2b4b04e9c3f9c5c9ce6354c5c9a941e115b39d48
3
+ metadata.gz: 4cf337c2f2e7a7f6015fb6ece7fa380735bc9f33
4
+ data.tar.gz: c32f763f0a332cd0e4e02a66c19d054602b7abe7
5
5
  SHA512:
6
- metadata.gz: 53b474afdf8d3209e96f48a237a718d66574f2c1ca420b05d9b846cd609424c612542c7398a9d48830a645c7fd6603cf09333d67a74947a32de40bb64c6b6e3d
7
- data.tar.gz: 17f8577cc2c3621679bb230587bf89731af52f487c66fae3ecefa93b0cacddb748c26cb163385b270a4780324f1e7dffd68c374dfb58fe8b05b130bbd1a3626d
6
+ metadata.gz: d2a055b30693b203b84b708dee0bf2903154fe9a7859873880a8a27c80134024b29e9075c7286ebc2ac71f96e24795e2b9814cbdbc26a58df12d5a01783524e3
7
+ data.tar.gz: f3f597fa92e9d18c0825e1172a3334bd996ae4d0c1829a07e2cb414b9d44a88e090dd3da4269b465755663537e77afd3fecc709755a107c3e09ebc2a0add31a9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- just_share (1.0.0)
4
+ just_share (1.0.1)
5
5
  colorize (~> 0.7.3, >= 0.7.3)
6
6
  multi_json (~> 1.10, >= 1.10.1)
7
7
  rest-client (~> 1.7, >= 1.7.2)
@@ -22,6 +22,11 @@ class String
22
22
  self == str
23
23
  end
24
24
 
25
+ # Return it last char
26
+ def last
27
+ self[self.length-1]
28
+ end
29
+
25
30
  # Rails Constantize (but renamed to not have conflicts)
26
31
  def to_constant
27
32
  camel_cased_word = self
@@ -1,6 +1,6 @@
1
1
  module JustShare
2
2
  MAJOR = 1
3
3
  MINOR = 0
4
- PATCH = 1
4
+ PATCH = 2
5
5
  VERSION = "#{MAJOR}.#{MINOR}.#{PATCH}"
6
6
  end
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.1
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: 2014-12-30 00:00:00.000000000 Z
11
+ date: 2015-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler