uploadcare-rails 0.2.2 → 0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +62 -18
- data/app/assets/javascripts/uploadcare-0.6.4.2.js +11766 -0
- data/app/assets/javascripts/uploadcare.js +1 -0
- data/lib/uploadcare-rails.rb +0 -1
- data/lib/uploadcare/rails/action_view.rb +9 -2
- data/lib/uploadcare/rails/settings.rb +4 -1
- data/lib/uploadcare/rails/version.rb +1 -1
- metadata +7 -21
@@ -0,0 +1 @@
|
|
1
|
+
// = require ./uploadcare-0.6.4.2
|
data/lib/uploadcare-rails.rb
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
module Uploadcare::Rails::ActionView
|
2
|
-
module
|
2
|
+
module Helpers
|
3
|
+
def uploadcare_include_tag(options = {})
|
4
|
+
version = options[:version] || Rails.application.config.uploadcare.widget_version
|
5
|
+
min = options[:min].nil? || options[:min]
|
6
|
+
url = "https://ucarecdn.com/widget/#{version}/uploadcare/uploadcare-#{version}#{'.min' if min}.js"
|
7
|
+
javascript_include_tag(url)
|
8
|
+
end
|
9
|
+
|
3
10
|
def uploadcare_uploader_tag(name)
|
4
11
|
hidden_field_tag name, nil, role: 'uploadcare-uploader'
|
5
12
|
end
|
@@ -24,4 +31,4 @@ module Uploadcare::Rails::ActionView
|
|
24
31
|
end
|
25
32
|
end
|
26
33
|
|
27
|
-
ActionView::Base.send :include, Uploadcare::Rails::ActionView::
|
34
|
+
ActionView::Base.send :include, Uploadcare::Rails::ActionView::Helpers
|
@@ -13,6 +13,9 @@ module Uploadcare
|
|
13
13
|
|
14
14
|
|
15
15
|
def initialize(settings = {})
|
16
|
+
settings = {
|
17
|
+
:widget_version => '0.6.4.2'
|
18
|
+
}.update(settings)
|
16
19
|
self.class.keys.each do |key|
|
17
20
|
send "#{key}=", settings[key] if settings[key].present?
|
18
21
|
end
|
@@ -31,4 +34,4 @@ module Uploadcare
|
|
31
34
|
end
|
32
35
|
end
|
33
36
|
end
|
34
|
-
end
|
37
|
+
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.
|
4
|
+
version: '0.3'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-03-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -43,22 +43,6 @@ dependencies:
|
|
43
43
|
- - '='
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: 0.0.2
|
46
|
-
- !ruby/object:Gem::Dependency
|
47
|
-
name: uploadcare-widget
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
|
-
requirements:
|
51
|
-
- - ! '>='
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '0'
|
54
|
-
type: :runtime
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
|
-
requirements:
|
59
|
-
- - ! '>='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
46
|
- !ruby/object:Gem::Dependency
|
63
47
|
name: sqlite3
|
64
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,6 +98,8 @@ executables: []
|
|
114
98
|
extensions: []
|
115
99
|
extra_rdoc_files: []
|
116
100
|
files:
|
101
|
+
- app/assets/javascripts/uploadcare-0.6.4.2.js
|
102
|
+
- app/assets/javascripts/uploadcare.js
|
117
103
|
- lib/uploadcare/rails/action_view.rb
|
118
104
|
- lib/uploadcare/rails/active_record.rb
|
119
105
|
- lib/uploadcare/rails/engine.rb
|
@@ -138,7 +124,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
138
124
|
version: '0'
|
139
125
|
segments:
|
140
126
|
- 0
|
141
|
-
hash:
|
127
|
+
hash: -3601515072921734921
|
142
128
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
129
|
none: false
|
144
130
|
requirements:
|
@@ -147,10 +133,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
133
|
version: '0'
|
148
134
|
segments:
|
149
135
|
- 0
|
150
|
-
hash:
|
136
|
+
hash: -3601515072921734921
|
151
137
|
requirements: []
|
152
138
|
rubyforge_project:
|
153
|
-
rubygems_version: 1.8.
|
139
|
+
rubygems_version: 1.8.24
|
154
140
|
signing_key:
|
155
141
|
specification_version: 3
|
156
142
|
summary: Rails gem for uploadcare.com service.
|