uploadcare-rails 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,11 +19,13 @@ module Uploadcare
19
19
  end
20
20
  end
21
21
 
22
- after_create "store_#{attribute}" if opts[:autostore]
22
+ if opts[:autostore]
23
+ after_create "store_#{attribute}"
23
24
 
24
- define_method "store_#{attribute}" do
25
- if send(attribute).present?
26
- send(attribute).store
25
+ define_method "store_#{attribute}" do
26
+ if send(attribute).present?
27
+ send(attribute).store
28
+ end
27
29
  end
28
30
  end
29
31
  end
@@ -9,6 +9,7 @@ module Uploadcare
9
9
 
10
10
  initializer 'uploadcare_rails.make_api' do |app|
11
11
  app.config.uploadcare.make_api
12
+ app.config.uploadcare.make_uploader
12
13
  end
13
14
 
14
15
  initializer 'uploadcare_rails.load' do
@@ -25,6 +25,10 @@ module Uploadcare
25
25
  def make_api
26
26
  @api = Uploadcare::Api.new(get_settings)
27
27
  end
28
+
29
+ def make_uploader
30
+ @uploader = Uploadcare::Uploader.new(get_settings)
31
+ end
28
32
  end
29
33
  end
30
34
  end
@@ -1,5 +1,5 @@
1
1
  module Uploadcare
2
2
  module Rails
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uploadcare-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -32,17 +32,17 @@ dependencies:
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  none: false
34
34
  requirements:
35
- - - ! '>='
35
+ - - '='
36
36
  - !ruby/object:Gem::Version
37
- version: '0'
37
+ version: 0.0.2
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
- - - ! '>='
43
+ - - '='
44
44
  - !ruby/object:Gem::Version
45
- version: '0'
45
+ version: 0.0.2
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: uploadcare-widget
48
48
  requirement: !ruby/object:Gem::Requirement
@@ -138,7 +138,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
138
138
  version: '0'
139
139
  segments:
140
140
  - 0
141
- hash: 2858975572859248920
141
+ hash: 4429471094330193638
142
142
  required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  none: false
144
144
  requirements:
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
147
  version: '0'
148
148
  segments:
149
149
  - 0
150
- hash: 2858975572859248920
150
+ hash: 4429471094330193638
151
151
  requirements: []
152
152
  rubyforge_project:
153
153
  rubygems_version: 1.8.23