bone 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,10 @@
1
1
  BONE, CHANGES
2
2
 
3
+ #### 0.3.2 (2010-12-20) ###############################
4
+
5
+ * ADDED: Updated canonical_host handling for String input
6
+
7
+
3
8
  #### 0.3.1 (2010-12-17) ###############################
4
9
 
5
10
  * FIXED: Bone::VERSION
data/Rakefile CHANGED
@@ -25,7 +25,7 @@ begin
25
25
  gem.email = "delano@solutious.com"
26
26
  gem.homepage = "https://github.com/solutious/bone"
27
27
  gem.authors = ["Delano Mandelbaum"]
28
- gem.add_dependency("familia", ">= 0.6.0")
28
+ gem.add_dependency("familia", ">= 0.6.1")
29
29
  gem.add_dependency("em-http-request")
30
30
  end
31
31
  Jeweler::GemcutterTasks.new
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :MAJOR: 0
3
3
  :MINOR: 3
4
- :PATCH: 1
4
+ :PATCH: 2
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{bone}
8
- s.version = "0.3.1"
8
+ s.version = "0.3.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Delano Mandelbaum"]
12
- s.date = %q{2010-12-17}
12
+ s.date = %q{2010-12-20}
13
13
  s.default_executable = %q{bone}
14
14
  s.description = %q{A simple store for remote environment variables}
15
15
  s.email = %q{delano@solutious.com}
@@ -66,14 +66,14 @@ Gem::Specification.new do |s|
66
66
  s.specification_version = 3
67
67
 
68
68
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
69
- s.add_runtime_dependency(%q<familia>, [">= 0.6.0"])
69
+ s.add_runtime_dependency(%q<familia>, [">= 0.6.1"])
70
70
  s.add_runtime_dependency(%q<em-http-request>, [">= 0"])
71
71
  else
72
- s.add_dependency(%q<familia>, [">= 0.6.0"])
72
+ s.add_dependency(%q<familia>, [">= 0.6.1"])
73
73
  s.add_dependency(%q<em-http-request>, [">= 0"])
74
74
  end
75
75
  else
76
- s.add_dependency(%q<familia>, [">= 0.6.0"])
76
+ s.add_dependency(%q<familia>, [">= 0.6.1"])
77
77
  s.add_dependency(%q<em-http-request>, [">= 0"])
78
78
  end
79
79
  end
@@ -174,10 +174,14 @@ class Bone
174
174
  end
175
175
 
176
176
  def canonical_host host
177
- if URI === host
178
- host.port ||= 80
179
- host = [host.host.to_s, host.port.to_s].join(':')
177
+ unless URI === host
178
+ host = host.to_s unless String === host
179
+ host.strip!
180
+ host = "http://#{host}" unless host.match(/^https?:\/\//)
181
+ host = URI.parse(host)
180
182
  end
183
+ host.port ||= 80
184
+ host = [host.host.to_s, host.port.to_s].join(':')
181
185
  host.downcase
182
186
  end
183
187
 
@@ -332,7 +336,7 @@ class Bone
332
336
  end
333
337
  def destroy(token, secret)
334
338
  Token.tokens.delete token
335
- Token.new(token).secret.destroy!
339
+ Token.new(token).secret.delete
336
340
  end
337
341
  def register(token, secret)
338
342
  raise RuntimeError, "Could not generate token" if token.nil? || token?(token)
@@ -71,7 +71,7 @@ class Bone::CLI < Drydock::Command
71
71
  unless t.nil?
72
72
  puts "# Your token for #{Bone.source}"
73
73
  puts "BONE_TOKEN=#{t}"
74
- puts "BONE_SECRET=#{s}"
74
+ puts "BONE_SECRET='#{s}'"
75
75
  end
76
76
  #rescue Bone::NoToken => ex
77
77
  # update_token_dialog
@@ -9,7 +9,7 @@ Bone::API::Redis::Token.redis_objects.keys.collect(&:to_s).sort
9
9
 
10
10
  ## Bone::API::Redis::Token.redis_objects
11
11
  Bone::API::Redis::Token.class_redis_objects.keys
12
- #=> [:tokens]
12
+ #=> [:tokens, :instances]
13
13
 
14
14
  ## Bone::API::Redis::Token.new
15
15
  @tobj = Bone::API::Redis::Token.new :atoken
@@ -18,7 +18,7 @@ Bone::API::Redis::Token.class_redis_objects.keys
18
18
 
19
19
  ## Bone::API::Redis::Token#secret
20
20
  @tobj.secret.class
21
- #=> Familia::Object::String
21
+ #=> Familia::String
22
22
 
23
23
  ## Bone::API::Redis::Token#secret= doesn't exist
24
24
  @tobj.secret = :poop
@@ -26,7 +26,7 @@ Bone::API::Redis::Token.class_redis_objects.keys
26
26
 
27
27
  ## Bone::API::Redis::Token#secret isn't affected by secret=
28
28
  @tobj.secret.class
29
- #=> Familia::Object::String
29
+ #=> Familia::String
30
30
 
31
31
  ## Bone::API::Redis::Token#secret to_s
32
32
  @tobj.secret.to_s
@@ -43,7 +43,7 @@ Bone::API::Redis::Key.redis_objects.keys
43
43
 
44
44
  ## Bone::API::Redis::Key#value
45
45
  @kobj.value.class
46
- #=> Familia::Object::String
46
+ #=> Familia::String
47
47
 
48
48
  ## Bone::API::Redis::Key#value to_s returns empty string
49
49
  @kobj.value.to_s
@@ -59,7 +59,7 @@ Bone::API::Redis::Key.redis_objects.keys
59
59
 
60
60
  ## Bone::API::Redis::Key#value set
61
61
  @kobj.value.set 'avalue2'
62
- #=> 'avalue2'
62
+ #=> 'OK'
63
63
 
64
64
  ## Bone::API::Redis::Key#value clear
65
65
  @kobj.value.clear
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bone
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 1
10
- version: 0.3.1
9
+ - 2
10
+ version: 0.3.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Delano Mandelbaum
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-17 00:00:00 -05:00
18
+ date: 2010-12-20 00:00:00 -05:00
19
19
  default_executable: bone
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -26,12 +26,12 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- hash: 7
29
+ hash: 5
30
30
  segments:
31
31
  - 0
32
32
  - 6
33
- - 0
34
- version: 0.6.0
33
+ - 1
34
+ version: 0.6.1
35
35
  type: :runtime
36
36
  version_requirements: *id001
37
37
  - !ruby/object:Gem::Dependency