storage_room 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,6 @@
1
+ == Version 0.3.3
2
+ * Added gem version information to default user agent header
3
+
1
4
  === Version 0.3.2
2
5
  * Support for File and Image uploads
3
6
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.2
1
+ 0.3.3
data/lib/storage_room.rb CHANGED
@@ -102,6 +102,10 @@ module StorageRoom
102
102
  self.entry_class_mappings[name] || name.gsub(/\s+/, "").classify
103
103
  end
104
104
 
105
+ def version
106
+ @version ||= ::File.read(::File.expand_path(::File.dirname(__FILE__) + '/../VERSION'))
107
+ end
108
+
105
109
  # Requests are made with SSL
106
110
  def ssl=(ssl)
107
111
  @ssl = ssl
@@ -8,7 +8,7 @@ module StorageRoom
8
8
 
9
9
  plugin IdentityMap
10
10
 
11
- headers 'User-Agent' => 'StorageRoom Ruby Gem', 'Accept' => 'application/json', 'Content-Type' => 'application/json'
11
+ headers 'User-Agent' => "StorageRoom Ruby Gem (#{StorageRoom.version})", 'Accept' => 'application/json', 'Content-Type' => 'application/json'
12
12
  format :json
13
13
 
14
14
  class << self
@@ -132,4 +132,10 @@ describe StorageRoom do
132
132
  end
133
133
  end
134
134
 
135
+ describe "#version" do
136
+ it "should return version number" do
137
+ StorageRoom.version.should =~ /\A\d+\.\d+\.\d+\Z/
138
+ end
139
+ end
140
+
135
141
  end
data/storage_room.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{storage_room}
8
- s.version = "0.3.2"
8
+ s.version = "0.3.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Sascha Konietzke"]
12
- s.date = %q{2011-07-04}
12
+ s.date = %q{2011-07-07}
13
13
  s.description = %q{StorageRoom is a CMS system for Mobile Applications (iPhone, Android, BlackBerry, ...). This library gives you an ActiveModel-like interface to your data.}
14
14
  s.email = %q{sascha@thriventures.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 2
9
- version: 0.3.2
8
+ - 3
9
+ version: 0.3.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Sascha Konietzke
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-07-04 00:00:00 +02:00
17
+ date: 2011-07-07 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency