paperclip-remote 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ba0c062bddceba5ff1822a4afba0552b5eeebc87
4
+ data.tar.gz: 16bd5d3527157db7074f2341067b54840e3ac445
5
+ SHA512:
6
+ metadata.gz: 5911ebb1b89887602d1cb5c550b539cd332bdb0511935ddec3d2b04f23c13ebc5ac27ed81483511e6606b5c7fc033a5b326c60a79d455ce2fb557c2e6fbe3abb
7
+ data.tar.gz: 47b0c99fe3f93f3bddc9aba8556e4b578477cc0d103f6461543e4cb99a41d5d15684b72a20e6a6385a2104339d966c3fe0ed68059ac1809ab9ffefbfb1e8f5ae
@@ -0,0 +1,5 @@
1
+ en:
2
+ activerecord:
3
+ errors:
4
+ messages:
5
+ unreachable: is unreachable
@@ -0,0 +1,5 @@
1
+ fr:
2
+ activerecord:
3
+ errors:
4
+ messages:
5
+ unreachable: est inaccessible
@@ -17,6 +17,10 @@ require 'open-uri'
17
17
  # <%= f.text_field :photo_remote_url %>
18
18
  #
19
19
  module Paperclip::Remote
20
+ def self.included(base)
21
+ locale_path = Dir.glob(File.dirname(__FILE__) + "/locales/*.{rb,yml}")
22
+ I18n.load_path += locale_path unless I18n.load_path.include?(locale_path)
23
+ end
20
24
 
21
25
  def has_attached_file_with_remote(name, options = {})
22
26
  original = has_attached_file_without_remote(name, options)
@@ -45,6 +49,7 @@ module Paperclip::Remote
45
49
  send :"#{name}=", url
46
50
  end
47
51
  rescue OpenURI::HTTPError
52
+ record.errors.add(:"#{name}_remote_url", :unreachable)
48
53
  end
49
54
  end
50
55
 
metadata CHANGED
@@ -1,147 +1,135 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paperclip-remote
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
5
- prerelease:
4
+ version: 0.8.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Dimitrij Denissenko
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-06-27 00:00:00.000000000 Z
11
+ date: 2013-11-15 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: paperclip
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
- version: 3.0.0
19
+ version: 3.4.0
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
- version: 3.0.0
26
+ version: 3.4.0
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rspec
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: webmock
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: sqlite3
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - '>='
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - '>='
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0'
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: rails
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - '>='
100
88
  - !ruby/object:Gem::Version
101
- version: '0'
89
+ version: 4.0.0
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - '>='
108
95
  - !ruby/object:Gem::Version
109
- version: '0'
96
+ version: 4.0.0
110
97
  description: Allows fetching attachments from remote locations
111
- email: dimitrij@blacksquaremedia.com
98
+ email: info@blacksquaremedia.com
112
99
  executables: []
113
100
  extensions: []
114
101
  extra_rdoc_files: []
115
102
  files:
116
103
  - LICENSE
117
104
  - README.rdoc
105
+ - lib/paperclip/locales/fr.yml
106
+ - lib/paperclip/locales/en.yml
118
107
  - lib/paperclip/remote.rb
119
108
  - lib/paperclip-remote.rb
120
109
  - lib/paperclip_remote.rb
121
110
  - rails/init.rb
122
111
  homepage: https://github.com/bsm/paperclip-remote
123
112
  licenses: []
113
+ metadata: {}
124
114
  post_install_message:
125
115
  rdoc_options: []
126
116
  require_paths:
127
117
  - lib
128
118
  required_ruby_version: !ruby/object:Gem::Requirement
129
- none: false
130
119
  requirements:
131
- - - ! '>='
120
+ - - '>='
132
121
  - !ruby/object:Gem::Version
133
122
  version: 1.9.0
134
123
  required_rubygems_version: !ruby/object:Gem::Requirement
135
- none: false
136
124
  requirements:
137
- - - ! '>='
125
+ - - '>='
138
126
  - !ruby/object:Gem::Version
139
127
  version: 1.3.6
140
128
  requirements: []
141
129
  rubyforge_project:
142
- rubygems_version: 1.8.25
130
+ rubygems_version: 2.0.3
143
131
  signing_key:
144
- specification_version: 3
132
+ specification_version: 4
145
133
  summary: Plugin for Paperclip
146
134
  test_files: []
147
135
  has_rdoc: