dropzonejs-rails 0.7.3 → 0.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -3
- data/Rakefile +31 -23
- data/lib/dropzonejs-rails/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24bf02aa96bdf5f537aab7bc4d6e1c89819c3e2d
|
4
|
+
data.tar.gz: e7b5e4fbabdf0de715e2ae79fc83577f2854775e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4fb5275cd5fed0c7d993a2d70e4b5283666539b8251ff53be460ed41fa654c3b2b8ffd42b09b0db7d1dfa5fd4755cac14a228175337fcf2c42b0d9d32e5d2da
|
7
|
+
data.tar.gz: a030b2d0f6550a43fddd16939f02126d34f2058d971599234e58c76ff7e48e09fdec49752c7239bc995a46d6a32615cf03e812d955b5b98e70a1ce5ba314763b
|
data/README.md
CHANGED
@@ -57,11 +57,14 @@ Go to [this secret place](https://github.com/ncuesta/dropzonejs-rails/issues).
|
|
57
57
|
|
58
58
|
### Getting the latest version of Dropzone
|
59
59
|
|
60
|
-
1. Run `rake check` to see if there is a newer version of Dropzone available.
|
61
|
-
2. If **1.** tells you
|
60
|
+
1. Run `rake dropzone:check` to see if there is a newer version of Dropzone available.
|
61
|
+
2. If **1.** tells you that a new version is available, you can run `rake dropzone:replace` - it'll download the files for you.
|
62
|
+
3. If **1.** tells you that a new version is available, you can run `rake dropzone:bump` - it'll download the files, commit and release them for you.
|
62
63
|
|
63
64
|
## Changelog
|
64
65
|
|
66
|
+
* v0.7.4
|
67
|
+
* Refactors rake tasks for better separation of concerns and a cleaner use. **#41 By [@thomasstephane](https://github.com/thomasstephane).**
|
65
68
|
* v0.7.0
|
66
69
|
* Updates Dropzone to the 4.x branch
|
67
70
|
* v0.5.1
|
@@ -71,7 +74,7 @@ Go to [this secret place](https://github.com/ncuesta/dropzonejs-rails/issues).
|
|
71
74
|
|
72
75
|
## Licence (MIT)
|
73
76
|
|
74
|
-
(c) Copyright 2013-
|
77
|
+
(c) Copyright 2013-2017 José Nahuel Cuesta Luengo
|
75
78
|
|
76
79
|
Permission is hereby granted, free of charge, to any person obtaining
|
77
80
|
a copy of this software and associated documentation files (the
|
data/Rakefile
CHANGED
@@ -11,21 +11,26 @@ require 'open-uri'
|
|
11
11
|
require 'octokit'
|
12
12
|
require 'dropzonejs-rails'
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
end
|
22
|
-
|
23
|
-
desc 'Find the latest dropzone js version and get it'
|
24
|
-
task :check do
|
25
|
-
latest_version = Octokit.tags('enyo/dropzone').first.name.gsub(/[^\d\.]/, '')
|
14
|
+
namespace :dropzone do
|
15
|
+
desc 'Check if there is a more recent version of dropzone js'
|
16
|
+
task :check do
|
17
|
+
if latest_version != DropzonejsRails::DROPZONE_VERSION
|
18
|
+
puts "A new version of dropzone (v#{latest_version}) has been found.\nYou may now run: `rake dropzone:replace` to update it or directly rake dropzone:bump. to replace, commit and release it."
|
19
|
+
else
|
20
|
+
abort "The bundled version of dropzone (v#{DropzonejsRails::DROPZONE_VERSION}) already is the latest one."
|
21
|
+
end
|
22
|
+
end
|
26
23
|
|
27
|
-
|
24
|
+
desc 'Replace latest dropzone js build by most recent'
|
25
|
+
task :replace do
|
26
|
+
puts "=> Fetching dropzone v#{DropzonejsRails::DROPZONE_VERSION}..."
|
27
|
+
download_dropzone_file 'dropzone.js', 'app/assets/javascripts/dropzone.js'
|
28
|
+
download_dropzone_file 'basic.css', 'app/assets/stylesheets/dropzone/basic.scss'
|
29
|
+
download_dropzone_file 'dropzone.css', 'app/assets/stylesheets/dropzone/dropzone.scss'
|
30
|
+
puts " ✔ Fetched"
|
28
31
|
version = File.join(File.dirname(__FILE__), 'lib', 'dropzonejs-rails', 'version.rb')
|
32
|
+
|
33
|
+
puts "=> Update dropzonejs-rails version from '#{DropzonejsRails::VERSION}' to '#{new_version}'"
|
29
34
|
sed version, {
|
30
35
|
/DROPZONE_VERSION\s+=\s+'#{DropzonejsRails::DROPZONE_VERSION}'/ => "DROPZONE_VERSION = '#{latest_version}'",
|
31
36
|
/\sVERSION\s+=\s+'#{DropzonejsRails::VERSION}'/ => " VERSION = '#{new_version}'"
|
@@ -33,17 +38,16 @@ task :check do
|
|
33
38
|
|
34
39
|
readme = File.join(File.dirname(__FILE__), 'README.md')
|
35
40
|
sed readme, { /\*\*Dropzone v#{DropzonejsRails::DROPZONE_VERSION}\*\*/ => "**Dropzone v#{latest_version}**" }
|
36
|
-
|
37
|
-
puts "A new version of dropzone (v#{latest_version}) has been found, and the source files have been accordingly updated.\nYou may now run: `rake get` to get it."
|
38
|
-
else
|
39
|
-
raise "The bundled version of dropzone (v#{DropzonejsRails::DROPZONE_VERSION}) already is the latest one."
|
41
|
+
puts " ✔ Done"
|
40
42
|
end
|
41
|
-
end
|
42
43
|
|
43
|
-
desc 'Bump the dropzone js version to the latest, commit changes and perform a release'
|
44
|
-
task bump: [:check, :
|
45
|
-
|
46
|
-
|
44
|
+
desc 'Bump the dropzone js version to the latest, commit changes and perform a release'
|
45
|
+
task bump: [:check, :replace] do
|
46
|
+
puts "=> Commit and release"
|
47
|
+
%x{ git add -A . && git commit -m 'rake bump: Version bump' }
|
48
|
+
Rake::Task['release'].invoke
|
49
|
+
puts " ✔ Done"
|
50
|
+
end
|
47
51
|
end
|
48
52
|
|
49
53
|
def download_dropzone_file(source_file, target_file)
|
@@ -63,6 +67,10 @@ end
|
|
63
67
|
|
64
68
|
def new_version
|
65
69
|
parts = DropzonejsRails::VERSION.split('.')
|
66
|
-
parts[2] = parts[2].
|
70
|
+
parts[2] = parts[2].next
|
67
71
|
parts.join '.'
|
68
72
|
end
|
73
|
+
|
74
|
+
def latest_version
|
75
|
+
Octokit.tags('enyo/dropzone').first.name.gsub(/[^\d\.]/, '')
|
76
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dropzonejs-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- José Nahuel Cuesta Luengo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|
@@ -89,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
89
|
version: '0'
|
90
90
|
requirements: []
|
91
91
|
rubyforge_project:
|
92
|
-
rubygems_version: 2.
|
92
|
+
rubygems_version: 2.6.8
|
93
93
|
signing_key:
|
94
94
|
specification_version: 4
|
95
95
|
summary: Integrates Dropzone JS File upload into Rails Asset pipeline.
|