effective_developer 0.7.0 → 0.7.2

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
2
  SHA256:
3
- metadata.gz: 8cbbc8b5ba4d68308ca2a88b89429babda497104898294b75cc19dab4a647f62
4
- data.tar.gz: 173a56355b32830c2e559bf0c3fc9437d379ee769055f1ef488d2df49c5d914f
3
+ metadata.gz: d37c9d0a46ceaa1efa533de250dad4914adbc1c9b8b00bc530f3d0bedf725dfa
4
+ data.tar.gz: 81b6a6c729c22e066f437020a1d283af6503066d3f98bdd69a26c0bfd0712486
5
5
  SHA512:
6
- metadata.gz: 2a6e277768ad7dfe4bdb4343e51a1a54c9d393111191ec826e099c4c87553cf8086cba87e2156da8c172056e77ab93884b908cefdaeec2daf664da9554f64459
7
- data.tar.gz: 36af9570a2236981884481ef865220326a8ca5a54c85add457d4cf1ee9a9bedae2538f8d88586deda7bde946c22b86e94a90744446993c8b4ecd01d946b9dc14
6
+ metadata.gz: 29a6152263a8d0d93ab15f42b7c9e4c68a6a561af5afb77bd23ab01844a6add49a4077ba9e317507b3aae7239b647bdd222ff99a02922e3bd210ae00308a5e6f
7
+ data.tar.gz: cd95e02868298e3982ce018ec4e6b81cc18a84dc36117450792ccd5745a6b21fb2b41c8f0d14f3b72f89808fc006dfe3bbd00ae87492db437e73252889094eab
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # Effective Developer
2
2
 
3
+
3
4
  This gem contains some developer quality of life scripts and rails helpers.
4
5
 
5
6
  ## Getting Started
@@ -440,6 +441,14 @@ rails generate effective:views thing
440
441
  rails generate effective:form thing
441
442
  ```
442
443
 
444
+ ## Replace SQL Example
445
+
446
+ You can do this:
447
+
448
+ ```
449
+ Region.update_all("snippets = REPLACE(snippets, 'ActionController::Parameters', 'ActiveSupport::HashWithIndifferentAccess')")
450
+ ```
451
+
443
452
  ## License
444
453
 
445
454
  MIT License. Copyright [Code and Effect Inc.](http://www.codeandeffect.com/)
@@ -12,7 +12,7 @@ module Effective
12
12
  def initialize(csv_file = default_csv_files(), header: true)
13
13
  @has_header_row = header
14
14
 
15
- @csv_file = Array(csv_file).find { |csv_file| File.exists?(csv_file) }
15
+ @csv_file = Array(csv_file).find { |csv_file| File.exist?(csv_file) }
16
16
  raise "#{csv_file} does not exist" unless @csv_file
17
17
  end
18
18
 
@@ -1,3 +1,3 @@
1
1
  module EffectiveDeveloper
2
- VERSION = '0.7.0'.freeze
2
+ VERSION = '0.7.2'.freeze
3
3
  end
@@ -24,7 +24,7 @@ module Effective
24
24
  end
25
25
 
26
26
  def create_ability
27
- unless File.exists?(resource.abilities_file)
27
+ unless File.exist?(resource.abilities_file)
28
28
  say_status(:skipped, :ability, :yellow) and return
29
29
  end
30
30
 
@@ -18,7 +18,7 @@ module Effective
18
18
  class_option :actions, type: :array, default: ['crud'], desc: 'Included actions', banner: 'index show'
19
19
 
20
20
  def invoke_model
21
- if File.exists?(resource.model_file)
21
+ if File.exist?(resource.model_file)
22
22
  say_status(:skipped, :model, :yellow) and return
23
23
  end
24
24
 
@@ -0,0 +1 @@
1
+ = f.url_field :<%= attribute %>
@@ -20,7 +20,7 @@ namespace :csv do
20
20
  Dir['lib/csv_importers/*.rb'].each do |file|
21
21
  importer = file.sub('lib/csv_importers/', '').sub('_importer.rb', '')
22
22
  csv_file = "lib/csv_importers/data/#{importer}.csv"
23
- next unless File.exists?(csv_file)
23
+ next unless File.exist?(csv_file)
24
24
 
25
25
  # rake csv:import:foo
26
26
  desc "Import #{importer} from #{csv_file}"
@@ -42,7 +42,7 @@ namespace :csv do
42
42
  Dir['lib/csv_importers/*.rb'].each do |file|
43
43
  importer = file.sub('lib/csv_importers/', '').sub('_importer.rb', '')
44
44
  csv_file = "lib/csv_importers/data/#{importer}.csv"
45
- next unless File.exists?(csv_file)
45
+ next unless File.exist?(csv_file)
46
46
 
47
47
  Rake::Task["csv:import:#{importer}"].invoke
48
48
  end
@@ -65,7 +65,7 @@ namespace :csv do
65
65
  csv_file = file.split('/').last.gsub('.csv', '')
66
66
 
67
67
  next if (Array(args.file_name) != ['all'] && Array(args.file_name).include?(csv_file) == false)
68
- next if args.file_name == 'all' && File.exists?("#{Rails.root}/lib/csv_importers/#{csv_file}_importer.rb")
68
+ next if args.file_name == 'all' && File.exist?("#{Rails.root}/lib/csv_importers/#{csv_file}_importer.rb")
69
69
 
70
70
  klass = csv_file.classify.pluralize
71
71
  columns = CSV.open(file, 'r') { |csv| csv.first }
@@ -99,7 +99,7 @@ namespace :pg do
99
99
  args.with_defaults(defaults.compact.merge(env_keys.compact).merge(keywords))
100
100
 
101
101
  # Validate filename
102
- unless File.exists?(Rails.root + args.filename)
102
+ unless File.exist?(Rails.root + args.filename)
103
103
  puts "#{args.filename || none} does not exist"; exit
104
104
  end
105
105
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_developer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-14 00:00:00.000000000 Z
11
+ date: 2023-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -108,6 +108,7 @@ files:
108
108
  - lib/scaffolds/fields/_field_select_constant.html.haml
109
109
  - lib/scaffolds/fields/_field_string.html.haml
110
110
  - lib/scaffolds/fields/_field_text.html.haml
111
+ - lib/scaffolds/fields/_field_url.html.haml
111
112
  - lib/scaffolds/fields/_nested_resource_fields.html.haml
112
113
  - lib/scaffolds/importers/csv_importer.rb
113
114
  - lib/tasks/annotate.rake