rateaux 1.6.1 → 2.0.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c92e8a64452ffcdeaa7a0c340d306b6faed460c6
4
- data.tar.gz: 54316ccaa4cab77cd3860ea58b4693057ea60554
2
+ SHA256:
3
+ metadata.gz: 83add348cf984a12112d1b43d1b5311062fe76e9c96b70ea11a9c187848f2319
4
+ data.tar.gz: bce392df04ca3321a3096c77f0fb56a5c75a7ba64b4213473255ebd692b9f713
5
5
  SHA512:
6
- metadata.gz: 9fa54f57c0bafb85148e928e23e5b3ab556e335c20098dccbd15472e864879e10ce63282a4a3ff991e6c8bbf44d912c7ba34eb1a6e774e08c6cab734aed51293
7
- data.tar.gz: 060e40c0c6f3da09883046271dc5939e4eaebd35599bdbc8316ab6fd4bc1adf5547298378c33b615eed8b9865cbb6f6bec17bff49fa5cfbe24e1c910f0c89ca6
6
+ metadata.gz: 7838b9980e77d57d20ba7e90c8c38c8fbff6feb33334889200b41464fa4cc488a818ba20bbf81a9419b78bb5951288e8c3ffa8ea9689944f079aafbb1938d811
7
+ data.tar.gz: 9983ea851dedcdf0a4575e8fab405f9240462c23022383889a27f7200586bc95623ed1779041c4a21d54881aacba76e8c5b1782e1f21c697cc40fd0cf9e88e3b
data/README.md CHANGED
@@ -1,21 +1,26 @@
1
1
  # Rateaux
2
2
 
3
- This is a collection of useful Rake tasks for Rails.
3
+ This is a collection of useful Rake tasks for Ruby on Rails applications.
4
+
5
+ ![Photo of an old wooden Rake on top of hay](https://github.com/user-attachments/assets/a1549ae8-a20f-4c87-a634-4298223bbb6e)
6
+
7
+ _[Hay Rake](https://www.flickr.com/photos/49708076@N05/23047850374/) photo by Larry Lamb_
4
8
 
5
9
  ## Install
6
10
 
7
- Add this line to your Gemfile to install it with Bundler:
11
+ Add these lines to your app's Gemfile:
8
12
 
9
13
  ```ruby
10
14
  # Rake tasks for Rails
11
15
  gem "rateaux"
12
16
  ```
13
17
 
14
- Then type `bundle install` in a terminal.
18
+ Then call `bundle install`.
19
+
15
20
 
16
- ## Rake Tasks
21
+ ## Tasks
17
22
 
18
- ### Truncate
23
+ ### DB Truncate
19
24
 
20
25
  Delete all data from the current database.
21
26
 
@@ -23,22 +28,15 @@ Delete all data from the current database.
23
28
  $ rake db:truncate
24
29
  ```
25
30
 
26
- ### Drop tables
31
+ ### DB Drop tables
27
32
 
28
- Delete all data and tables from the current database. This is similar to `db:drop` but it does not drop the database itself.
33
+ Delete all data and tables from the current database. This is similar to
34
+ `db:drop` but it does not drop the database itself.
29
35
 
30
36
  ```sh
31
37
  $ rake db:drop_tables
32
38
  ```
33
39
 
34
- ### Encoding headers
35
-
36
- Add the `# encoding: UTF-8` header to all ruby files in the project. Useful before Ruby 2.
37
-
38
- ```sh
39
- $ rake encoding_headers
40
- ```
41
-
42
40
  ### Checkout
43
41
 
44
42
  Remove migrations then checkout a git branch.
@@ -58,24 +56,45 @@ This will:
58
56
 
59
57
  ### Cache clear
60
58
 
61
- Empty the cache store.
59
+ Empty the Rails cache store.
60
+
61
+ ```sh
62
+ $ rake cache:clear
63
+ ```
64
+
65
+ ### Sidekiq flush
66
+
67
+ Empty Sidekiq’s queues.
62
68
 
63
69
  ```sh
64
- $ rake cache_clear
70
+ $ rake sidekiq:flush
65
71
  ```
66
72
 
67
73
  ### Assets Copy Non Digested
68
74
 
69
- Copy assets files with a digest (for example `application-d45e…565.css`) to their non-digested form (for example `application.css`).
75
+ Copy assets files with a digest (for example `application-d45e…565.css`)
76
+ to their non-digested form (for example `application.css`).
70
77
 
71
78
  ```sh
72
79
  $ rake assets:copy_non_digested
73
80
  ```
74
81
 
75
- ### View DB schema
82
+ ### DB schema view
76
83
 
77
- View the database structure
84
+ View the database structure.
78
85
 
79
86
  ```sh
80
87
  $ rake db:schema:view
81
88
  ```
89
+
90
+ ### Frozen string literal
91
+
92
+ Add the `# frozen_string_literal: true` header to all Ruby files in the project.
93
+
94
+ ```sh
95
+ $ rake add_frozen_string_literal_headers
96
+ ```
97
+
98
+ ## The name
99
+
100
+ In French _rateaux_ means _rakes_.
data/Rakefile CHANGED
@@ -1,32 +1,33 @@
1
1
  #!/usr/bin/env rake
2
+ # frozen_string_literal: true
2
3
 
3
4
  # bundler
4
5
  begin
5
- require 'bundler/setup'
6
+ require "bundler/setup"
6
7
  rescue LoadError
7
- puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
8
+ puts "You must `gem install bundler` and `bundle install` to run rake tasks"
8
9
  end
9
10
 
10
11
  Bundler::GemHelper.install_tasks
11
12
 
12
13
  # rdoc
13
14
  begin
14
- require 'rdoc/task'
15
+ require "rdoc/task"
15
16
  rescue LoadError
16
- require 'rdoc/rdoc'
17
- require 'rake/rdoctask'
17
+ require "rdoc/rdoc"
18
+ require "rake/rdoctask"
18
19
  RDoc::Task = Rake::RDocTask
19
20
  end
20
21
 
21
22
  RDoc::Task.new(:rdoc) do |rdoc|
22
- rdoc.rdoc_dir = 'rdoc'
23
- rdoc.title = 'Rateaux'
24
- rdoc.options << '--line-numbers'
25
- rdoc.rdoc_files.include('README.rdoc')
26
- rdoc.rdoc_files.include('lib/**/*.rb')
23
+ rdoc.rdoc_dir = "rdoc"
24
+ rdoc.title = "Rateaux"
25
+ rdoc.options << "--line-numbers"
26
+ rdoc.rdoc_files.include("README.rdoc")
27
+ rdoc.rdoc_files.include("lib/**/*.rb")
27
28
  end
28
29
 
29
30
  # rspec
30
- require 'rspec/core/rake_task'
31
+ require "rspec/core/rake_task"
31
32
  RSpec::Core::RakeTask.new(:spec)
32
- task :default => :spec
33
+ task default: :spec
@@ -1,40 +1,37 @@
1
- # encoding: UTF-8
2
- #
3
- # File Task
4
- #
5
- # Adds a task and a file task. The file depends on the task that it creates.
6
- #
7
- #
8
- # For example:
9
- #
10
- # require "rateaux/file_task"
11
- # include Rateaux::FileTask
12
- #
13
- # file_task "foo.txt", create: :environment do
14
- # touch "foo.txt"
15
- # end
16
- #
17
- # You can then:
18
- #
19
- # $ rake foo.txt # Will create the file only if it does not exist
20
- # $ rake create # Will create the file all the time
21
- #
22
- # Your tasks can now depend on the file beeing present or create them :
23
- #
24
- # task send: "foo.txt"
25
- #
26
- # With file_task you don't have to add this block to the file task:
27
- #
28
- # file "foo.txt" do
29
- # Rake::Task["create"]
30
- # end
31
- #
1
+ # frozen_string_literal: true
2
+
32
3
  module Rateaux
4
+ # File Task
5
+ #
6
+ # Adds a task and a file task. The file depends on the task that it creates.
7
+ #
8
+ # For example:
9
+ #
10
+ # require "rateaux/file_task"
11
+ # include Rateaux::FileTask
12
+ #
13
+ # file_task "foo.txt", create: :environment do
14
+ # touch "foo.txt"
15
+ # end
16
+ #
17
+ # You can then:
18
+ #
19
+ # $ rake foo.txt # Will create the file only if it does not exist
20
+ # $ rake create # Will create the file all the time
21
+ #
22
+ # Your tasks can now depend on the file beeing present or create them :
23
+ #
24
+ # task send: "foo.txt"
25
+ #
26
+ # With file_task you don't have to add this block to the file task:
27
+ #
28
+ # file "foo.txt" do
29
+ # Rake::Task["create"]
30
+ # end
31
+ #
33
32
  module FileTask
34
- def file_task(path, definition)
35
- t = task(definition) do
36
- yield
37
- end
33
+ def file_task(path, definition, &block)
34
+ t = task(definition, &block)
38
35
 
39
36
  file(path) do
40
37
  Rake::Task[t.name].invoke
@@ -1,42 +1,40 @@
1
- # encoding: UTF-8
2
- #
3
- # Namespaced
4
- #
5
- # Adds a namespace and a task with that namespace name.
6
- #
7
- # Choose the tasks you want to launch when using the namespace name
8
- # by giving them as a second argument or by defning a "default" task.
9
- #
10
- # For example:
11
- #
12
- # require "rateaux/namespaced"
13
- # include Rateaux::Namespaced
14
- #
15
- # desc "Export everything"
16
- # namespaced :export do
17
- # default: [:a, :b]
18
- #
19
- # …
20
- # end
21
- #
22
- # Is the same as:
23
- #
24
- # require "rateaux/namespaced"
25
- # include Rateaux::Namespaced
26
- #
27
- # desc "Export everything"
28
- # namespaced :export, [:a, :b] do
29
- # …
30
- # end
31
- #
32
- # Both definitions add a task "export" that cals "export:a" and "export:b"
33
- # without having to add:
34
- #
35
- # task export: ["export:a", "export:b"]
36
- #
1
+ # frozen_string_literal: true
2
+
37
3
  module Rateaux
4
+ # Adds a namespace and a task with that namespace name.
5
+ #
6
+ # Choose the tasks you want to launch when using the namespace name
7
+ # by giving them as a second argument or by defning a "default" task.
8
+ #
9
+ # For example:
10
+ #
11
+ # require "rateaux/namespaced"
12
+ # include Rateaux::Namespaced
13
+ #
14
+ # desc "Export everything"
15
+ # namespaced :export do
16
+ # default: [:a, :b]
17
+ #
18
+ # ...
19
+ # end
20
+ #
21
+ # Is the same as:
22
+ #
23
+ # require "rateaux/namespaced"
24
+ # include Rateaux::Namespaced
25
+ #
26
+ # desc "Export everything"
27
+ # namespaced :export, [:a, :b] do
28
+ # ...
29
+ # end
30
+ #
31
+ # Both definitions add a task "export" that cals "export:a" and "export:b"
32
+ # without having to add:
33
+ #
34
+ # task export: ["export:a", "export:b"]
35
+ #
38
36
  module Namespaced
39
- def namespaced(name, defaults = :default)
37
+ def namespaced(name, defaults = :default, &block)
40
38
  case defaults
41
39
  when Symbol, String
42
40
  task name => "#{name}:#{defaults}"
@@ -46,9 +44,7 @@ module Rateaux
46
44
  task name => defaults.to_a.map { |t| "#{name}:#{t}" }
47
45
  end
48
46
 
49
- namespace name do
50
- yield
51
- end
47
+ namespace name, &block
52
48
  end
53
49
  end
54
50
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Rateaux
2
- VERSION = "1.6.1".freeze
4
+ VERSION = "2.0.0"
3
5
  end
data/lib/rateaux.rb CHANGED
@@ -1,7 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Rateaux
4
+ # Tie to Rails
2
5
  class Railtie < Rails::Railtie
3
6
  rake_tasks do
4
- Dir[File.join(File.dirname(__FILE__),'tasks/*.rake')].each { |f| load f }
7
+ Dir[File.join(File.dirname(__FILE__), "tasks/*.rake")].each { |f| load f }
5
8
  end
6
9
  end
7
10
  end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Adds "frozen_string_literal: true" to the top of all Ruby files.
4
+ #
5
+ # $ rake add_frozen_string_literal_headers
6
+
7
+ desc "Adds the frozen_string_literal header to all Ruby files"
8
+ task add_frozen_string_literal_headers: :environment do
9
+ files = []
10
+ ["*.rb", "*.rake"].each do |extension|
11
+ files.concat(Dir[File.join(Dir.getwd.split("\\"), "**", extension)])
12
+ end
13
+
14
+ header = "# frozen_string_literal: true\n"
15
+
16
+ files.each do |file|
17
+ content = File.read(file)
18
+ next if content[0..header.length] == header
19
+
20
+ content = content.gsub(/^# (frozen_string_literal: true)\n/i, "")
21
+ content = "#{header}#{content}"
22
+
23
+ new_file = File.open(file, "w")
24
+ new_file.write(content)
25
+ new_file.close
26
+ end
27
+ end
@@ -1,10 +1,12 @@
1
- # encoding: UTF-8
2
- #
3
- # Empty Rails cache
1
+ # frozen_string_literal: true
2
+
3
+ # Empty Rails cache.
4
4
  #
5
- # $ rake cache_clear
5
+ # $ rake cache:clear
6
6
 
7
- desc "Empty Rails cache"
8
- task :cache_clear => :environment do
9
- Rails.cache.clear
7
+ namespace :cache do
8
+ desc "Empty Rails cache"
9
+ task clear: :environment do
10
+ Rails.cache.clear
11
+ end
10
12
  end
@@ -1,24 +1,22 @@
1
- # encoding: UTF-8
2
- #
1
+ # frozen_string_literal: true
2
+
3
3
  # Copy all assets to their non-digested form.
4
4
  #
5
5
  # Via https://github.com/rails/sprockets-rails/issues/49#issuecomment-20535134
6
6
 
7
7
  namespace :assets do
8
-
9
8
  desc "Copy non digested assets"
10
9
  task copy_non_digested: :environment do
11
- assets = Dir.glob(File.join(Rails.root, 'public/assets/**/*'))
10
+ assets = Dir.glob(File.join(Rails.root, "public/assets/**/*"))
12
11
  regex = /(-{1}[a-z0-9]{32}*\.{1}){1}/
13
12
  assets.each do |file|
14
13
  next if File.directory?(file) || file !~ regex
15
14
 
16
- source = file.split('/')
17
- source.push(source.pop.gsub(regex, '.'))
15
+ source = file.split("/")
16
+ source.push(source.pop.gsub(regex, "."))
18
17
 
19
18
  non_digested = File.join(source)
20
19
  FileUtils.cp(file, non_digested)
21
20
  end
22
21
  end
23
-
24
22
  end
@@ -1,11 +1,11 @@
1
- # encoding: UTF-8
2
- #
1
+ # frozen_string_literal: true
2
+
3
3
  # Truncate or delete all data from an SQL database.
4
4
  #
5
5
  # $ rake db:truncate
6
6
  # $ rake db:drop_tables
7
7
 
8
- require 'database_cleaner'
8
+ require "database_cleaner"
9
9
 
10
10
  namespace :db do
11
11
  desc "Truncate all tables"
@@ -1,22 +1,27 @@
1
- # encoding: UTF-8
2
- #
1
+ # frozen_string_literal: true
2
+
3
3
  # View database schema.
4
4
  #
5
5
  # $ rake db:schema:view
6
- require 'terminal-table'
6
+ require "terminal-table"
7
7
  namespace :db do
8
- namespace :schema do
9
- desc 'View database schema'
10
- task :view do
11
- @environment = ENV['RACK_ENV'] || 'development'
12
- @dbconfig = YAML.load(File.read('config/database.yml'))
13
- ActiveRecord::Base.establish_connection @dbconfig[@environment]
14
- tables = ActiveRecord::Base.connection.tables.reject { |t| t == "schema_migrations" }
15
- tables.each do |table|
16
- rows = ActiveRecord::Base.connection.columns(table).map{|column| [column.name, column.type] }
17
- table = Terminal::Table.new :title => "#{table.capitalize}", :headings => ['Name', 'Type'], :rows => rows
18
- puts table
19
- end
20
- end
8
+ namespace :schema do
9
+ desc "View database schema"
10
+ task :view do
11
+ @environment = ENV["RACK_ENV"] || "development"
12
+ @dbconfig = YAML.load_file("config/database.yml")
13
+ ActiveRecord::Base.establish_connection @dbconfig[@environment]
14
+ tables = ActiveRecord::Base.connection.tables.reject do |t|
15
+ t == "schema_migrations"
16
+ end
17
+ tables.each do |table|
18
+ rows = ActiveRecord::Base.connection.columns(table).map do |column|
19
+ [column.name, column.type]
20
+ end
21
+ table = Terminal::Table.new title: table.capitalize.to_s,
22
+ headings: %w[Name Type], rows: rows
23
+ puts table
24
+ end
21
25
  end
26
+ end
22
27
  end
@@ -1,6 +1,6 @@
1
- # encoding: UTF-8
2
- #
3
- # Remove migrations then checkout a git branch
1
+ # frozen_string_literal: true
2
+
3
+ # Remove migrations then checkout a git branch.
4
4
  #
5
5
  # $ rake checkout new_branch_name
6
6
  #
@@ -15,29 +15,31 @@
15
15
 
16
16
  desc "Switch git branches and apply migrations"
17
17
  task "checkout" do
18
-
19
18
  # We can't checkout if we're dirty
20
19
  unless `git diff --shortstat`.blank?
21
- $stderr.puts "error: Your local changes would be overwritten by checkout."
22
- $stderr.puts "Please, commit your changes or stash them before you can switch branches."
20
+ warn "error: Your local changes would be overwritten by checkout."
21
+ warn "Please, commit your changes or stash them before you can switch " \
22
+ "branches."
23
23
  abort "Aborting"
24
24
  end
25
25
 
26
26
  # Last argument trick
27
27
  # Via http://itshouldbeuseful.wordpress.com/2011/11/07/passing-parameters-to-a-rake-task/
28
- task ARGV.last do ; end
28
+ task ARGV.last do
29
+ # DO nothing
30
+ end
29
31
  branch_name = ARGV.last
30
32
 
31
33
  # List migrations
32
34
  changes = `git diff #{branch_name} --name-status`.lines
33
- migrations = changes.map { |change|
34
- match = /^A.*migrate\/([0-9]+)/.match(change)
35
+ migrations = changes.map do |change|
36
+ match = %r{^A.*migrate/([0-9]+)}.match(change)
35
37
  match ? match[1] : nil
36
- }.compact
38
+ end.compact
37
39
 
38
40
  # Drop it like it's hot
39
41
  migrations.sort.reverse.each do |migration|
40
- # TODO we're already in rake, we should call these tasks directly
42
+ # TODO: we're already in rake, we should call these tasks directly
41
43
  sh "bundle exec rake db:migrate:down VERSION=#{migration}"
42
44
  end
43
45
 
@@ -1,10 +1,10 @@
1
- # encoding: UTF-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  namespace :notes do
4
4
  task :mine do
5
5
  me = `whoami`.strip
6
- p Rake::Task['notes:custom'].arg_names
7
- #Rake::Task['notes:custom'].set_arg_names([:annotation])
8
- Rake::Task['notes:custom'].invoke("TODO @#{me}")
6
+ p Rake::Task["notes:custom"].arg_names
7
+ # Rake::Task["notes:custom"].set_arg_names([:annotation])
8
+ Rake::Task["notes:custom"].invoke("TODO @#{me}")
9
9
  end
10
10
  end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Empty all of Sidekiq's queues.
4
+ #
5
+ # $ rake sidekiq:flush
6
+
7
+ namespace :sidekiq do
8
+ desc "Empty Sidekiq queues"
9
+ task flush: :environment do
10
+ if Rails.env.production? && ENV["DISABLE_DATABASE_ENVIRONMENT_CHECK"] != "1"
11
+ raise "This task should not be run in production. Set " \
12
+ "DISABLE_DATABASE_ENVIRONMENT_CHECK=1 to override."
13
+ end
14
+
15
+ # Via https://stackoverflow.com/a/38672157/311657
16
+ require "sidekiq/api"
17
+ Sidekiq::RetrySet.new.clear
18
+ Sidekiq::ScheduledSet.new.clear
19
+ Sidekiq::DeadSet.new.clear
20
+ Sidekiq::Stats.new.reset
21
+ Sidekiq::Queue.all.map(&:clear)
22
+ end
23
+ end
metadata CHANGED
@@ -1,15 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rateaux
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sunny Ripert
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2017-02-26 00:00:00.000000000 Z
10
+ date: 2025-03-20 00:00:00.000000000 Z
12
11
  dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: database_cleaner
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: '0'
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: '0'
13
26
  - !ruby/object:Gem::Dependency
14
27
  name: rails
15
28
  requirement: !ruby/object:Gem::Requirement
@@ -25,7 +38,7 @@ dependencies:
25
38
  - !ruby/object:Gem::Version
26
39
  version: 3.2.20
27
40
  - !ruby/object:Gem::Dependency
28
- name: database_cleaner
41
+ name: terminal-table
29
42
  requirement: !ruby/object:Gem::Requirement
30
43
  requirements:
31
44
  - - ">="
@@ -39,13 +52,13 @@ dependencies:
39
52
  - !ruby/object:Gem::Version
40
53
  version: '0'
41
54
  - !ruby/object:Gem::Dependency
42
- name: terminal-table
55
+ name: jquery-rails
43
56
  requirement: !ruby/object:Gem::Requirement
44
57
  requirements:
45
58
  - - ">="
46
59
  - !ruby/object:Gem::Version
47
60
  version: '0'
48
- type: :runtime
61
+ type: :development
49
62
  prerelease: false
50
63
  version_requirements: !ruby/object:Gem::Requirement
51
64
  requirements:
@@ -53,7 +66,7 @@ dependencies:
53
66
  - !ruby/object:Gem::Version
54
67
  version: '0'
55
68
  - !ruby/object:Gem::Dependency
56
- name: sqlite3
69
+ name: rspec-rails
57
70
  requirement: !ruby/object:Gem::Requirement
58
71
  requirements:
59
72
  - - ">="
@@ -67,7 +80,7 @@ dependencies:
67
80
  - !ruby/object:Gem::Version
68
81
  version: '0'
69
82
  - !ruby/object:Gem::Dependency
70
- name: jquery-rails
83
+ name: rubocop
71
84
  requirement: !ruby/object:Gem::Requirement
72
85
  requirements:
73
86
  - - ">="
@@ -81,7 +94,35 @@ dependencies:
81
94
  - !ruby/object:Gem::Version
82
95
  version: '0'
83
96
  - !ruby/object:Gem::Dependency
84
- name: rspec-rails
97
+ name: rubocop-rspec
98
+ requirement: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ type: :development
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ - !ruby/object:Gem::Dependency
111
+ name: rubocop-rspec_rails
112
+ requirement: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
117
+ type: :development
118
+ prerelease: false
119
+ version_requirements: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
124
+ - !ruby/object:Gem::Dependency
125
+ name: sqlite3
85
126
  requirement: !ruby/object:Gem::Requirement
86
127
  requirements:
87
128
  - - ">="
@@ -108,17 +149,18 @@ files:
108
149
  - lib/rateaux/file_task.rb
109
150
  - lib/rateaux/namespaced.rb
110
151
  - lib/rateaux/version.rb
152
+ - lib/tasks/rateaux_add_frozen_string_literal_headers.rake
111
153
  - lib/tasks/rateaux_cache_clear.rake
112
154
  - lib/tasks/rateaux_copy_non_digested_assets.rake
113
155
  - lib/tasks/rateaux_db.rake
114
156
  - lib/tasks/rateaux_db_schema_view.rake
115
- - lib/tasks/rateaux_encoding_headers.rake
116
157
  - lib/tasks/rateaux_git_checkout.rake
117
158
  - lib/tasks/rateaux_notes_mine.rake
159
+ - lib/tasks/rateaux_sidekiq_flush.rake
118
160
  homepage: http://github.com/sunny/rateaux
119
161
  licenses: []
120
- metadata: {}
121
- post_install_message:
162
+ metadata:
163
+ rubygems_mfa_required: 'true'
122
164
  rdoc_options: []
123
165
  require_paths:
124
166
  - lib
@@ -126,16 +168,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
126
168
  requirements:
127
169
  - - ">="
128
170
  - !ruby/object:Gem::Version
129
- version: '0'
171
+ version: 2.7.0
130
172
  required_rubygems_version: !ruby/object:Gem::Requirement
131
173
  requirements:
132
174
  - - ">="
133
175
  - !ruby/object:Gem::Version
134
176
  version: '0'
135
177
  requirements: []
136
- rubyforge_project:
137
- rubygems_version: 2.5.1
138
- signing_key:
178
+ rubygems_version: 3.6.2
139
179
  specification_version: 4
140
180
  summary: A collection of usefull Rake tasks for Rails.
141
181
  test_files: []
@@ -1,25 +0,0 @@
1
- # encoding: UTF-8
2
- #
3
- # Add 'encoding: UTF-8' to all files
4
- #
5
- # $ rake encoding_headers
6
-
7
- desc "Adds the missing utf-8 encoding header on all Ruby files"
8
- task :encoding_headers => :environment do
9
- files = []
10
- ["*.rb", "*.rake"].each do |extension|
11
- files.concat(Dir[ File.join(Dir.getwd.split(/\\/), "**", extension) ])
12
- end
13
-
14
- encoding = "# encoding: UTF-8\n"
15
-
16
- files.each do |file|
17
- content = File.read(file)
18
- next if content[0..encoding.length] == encoding
19
- content = content.gsub(/^# (encoding: UTF-8|coding: UTF-8|-*- coding: UTF-8 -*-)\n/i, "")
20
- new_file = File.open(file, "w")
21
- new_file.write(encoding+content)
22
- new_file.close
23
- end
24
- end
25
-