yodatra 0.2.1 → 0.2.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: 2a1f386dd2dea2c9dad90137008414c37c4c28e9
4
- data.tar.gz: 4831495085c846a28c3904816ed625b9ac636fbc
3
+ metadata.gz: 65d36e7172948cd089594808cfdc04392e99cd70
4
+ data.tar.gz: 216763ae662e18305bfc6ed9a3722f4d05d647e3
5
5
  SHA512:
6
- metadata.gz: cb10560b41c7a8bcdaf7e9602235b1e328c08f7045cda980012985c7feb70e6bd9a837eb2d195ef939ef0e77fe5ad72f22f48b732bec6ac8a89faa461d71a970
7
- data.tar.gz: 7fc27841ac19213f302bcc06a5139e11fb581869467d262137f735cf63da10d415d3412b1c39c4acc085e6e6b169599ddfc9fcce3e90ea5f15c5c9f61327fad1
6
+ metadata.gz: dc542b12dccae838b5f9974e2901aa70dbb986d8b5f163a275cb02e053fa364a6ab39a6a094892248c63ea2181c89f974ef6accdd0f9fd1621dc0fab592026b9
7
+ data.tar.gz: 5282a19fc4509496d5a0e49dc4351a977e3845440fb7d97c14a632b7099b080551e51436b0d311c4a7d7b44c3d69c3049d50f4a72dfc397c4977b99c15339c07
data/lib/yodatra/boot.rb CHANGED
@@ -21,12 +21,6 @@ module Yodatra
21
21
  if app.booting
22
22
  # ActiveRecord
23
23
  app.register Sinatra::ActiveRecordExtension
24
- sinatra_ar_version = Gem.loaded_specs['sinatra-activerecord'].version.to_s
25
- if sinatra_ar_version.gsub('\.', '') <= '123'
26
- app.set :database_file, "#{Dir.pwd}/config/database.yml"
27
- else
28
- app.logger.warn("check out the new version (#{sinatra_ar_version}) of sinatra-activerecord, does it include PR#19 ?") if app.logger
29
- end
30
24
 
31
25
  app_file = "#{app.config_directory}/application.rb"
32
26
  require File.expand_path(app_file) if File.exist? app_file
@@ -55,7 +55,7 @@ module Yodatra
55
55
  post ALL_ROUTE do
56
56
  retrieve_resources CREATE_ONE do |resource|
57
57
  hash = self.send("#{model_name.underscore}_params".to_sym)
58
- @one = resource.create hash
58
+ @one = resource.new hash
59
59
 
60
60
  if @one.save
61
61
  @one.as_json(read_scope).to_json
@@ -196,4 +196,4 @@ module Yodatra
196
196
  end
197
197
 
198
198
  end
199
- end
199
+ end
@@ -1,3 +1,3 @@
1
1
  module Yodatra
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
data/yodatra.gemspec CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new 'yodatra', Yodatra::VERSION do |s|
15
15
 
16
16
  s.add_dependency 'rack', '~> 1.4'
17
17
  s.add_dependency 'sinatra', '~> 1.4.4', '>= 1.4.4'
18
- s.add_dependency 'sinatra-activerecord'
18
+ s.add_dependency 'sinatra-activerecord', '>= 1.2.4'
19
19
  s.add_dependency 'sinatra-logger'
20
20
  s.add_dependency 'sinatra-contrib', '~> 1.4.2', '>= 1.4.2'
21
21
  s.add_dependency 'rack-protection', '~> 1.4'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yodatra
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Bonaud
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-17 00:00:00.000000000 Z
11
+ date: 2014-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -50,14 +50,14 @@ dependencies:
50
50
  requirements:
51
51
  - - '>='
52
52
  - !ruby/object:Gem::Version
53
- version: '0'
53
+ version: 1.2.4
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - '>='
59
59
  - !ruby/object:Gem::Version
60
- version: '0'
60
+ version: 1.2.4
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: sinatra-logger
63
63
  requirement: !ruby/object:Gem::Requirement