act_with_bag 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ecc3541b5c744c54c7f53770c3b7172e4935fb0d5f4b7e7edf39502e334ca6e
4
- data.tar.gz: da6b991ddd14d98b4b079c258544b9fb4408d24f73553a796a71212c8865e23d
3
+ metadata.gz: 871f3f51d537f9fb7c8c3ae382f5d7f2c7349deb804800ca542234efbb6a5610
4
+ data.tar.gz: 02d895e0fe5e183359a251ab4471251e72cd712fb857b58bd2c4da97dd7bf12a
5
5
  SHA512:
6
- metadata.gz: 8a5960ac831f6404d46b1843933bdf533203917187244442e0c38f74c41bdcf39b5651d1fde36b02190a757a92ebbe5a4f7fb4ca638a1087b9d2d503c91d4044
7
- data.tar.gz: 69ec721ff96ccbd202daf926127a2f484e47244af0c9bb6abac5cf799eb175c5ec50ae4c9cb053d6b935165e1494b17b5b8e1f44bee1e1a69a68a3cb51008fb6
6
+ metadata.gz: 0cdfeb658c20412bb3bc41ab5356c339da8441bda6fbaea054ebb58aa9feb7bb969ed95fb6821a77193e1f564b6a7e5a39af87230359e7011f93d578910ab3be
7
+ data.tar.gz: 4eb41d1ffc191cc1f52a2cf35cb50d7c3b0144fa04bb8b91c439514a09c62df61c37c60cab26054d57c768b6134fe38501cb224c4c4eccf2f04d6bebe4845df1
@@ -1,7 +1,6 @@
1
1
  # see also https://github.com/whitequark/parser/blob/master/.github/workflows/test.yml
2
2
  name: Rake
3
3
 
4
- #on: [push, pull_request]
5
4
  on: [push]
6
5
 
7
6
  jobs:
@@ -9,16 +8,13 @@ jobs:
9
8
  strategy:
10
9
  fail-fast: false
11
10
  matrix:
12
- # os: [ubuntu-latest, macos-latest]
13
11
  os: [ubuntu-latest]
14
- # Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
15
- # ruby: [2.5, 2.6, 2.7, '3.0', head, jruby, jruby-head, truffleruby, truffleruby-head]
16
- ruby: ["2.7.2", 3.1.0, head]
12
+ ruby: ["2.7", "3.0", "3.2", head]
17
13
  test_command: ["bundle exec rake test"]
18
14
  runs-on: ${{ matrix.os }}
19
15
 
20
16
  steps:
21
- - uses: actions/checkout@v2
17
+ - uses: actions/checkout@v3
22
18
  - uses: ruby/setup-ruby@v1
23
19
  with:
24
20
  ruby-version: ${{ matrix.ruby }}
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-3.1.3
1
+ ruby-3.2.2
data/Appraisals CHANGED
@@ -1,24 +1,24 @@
1
- appraise "rails-6.1" do
2
- gem "rails", "~> 6.1"
3
- gem "dryer-config", "~> 6.0"
1
+ appraise "rails-7.0" do
2
+ gem "rails", "~> 7.0"
3
+ gem "dryer-config", "~> 7.0"
4
4
  end
5
5
 
6
- appraise "rails-6.0" do
7
- gem "rails", "~> 6.0"
6
+ appraise "rails-6.1" do
7
+ gem "rails", "~> 6.1"
8
8
  gem "dryer-config", "~> 6.0"
9
9
  end
10
10
 
11
+ # appraise "rails-6.0" do
12
+ # gem "rails", "~> 6.0"
13
+ # gem "dryer-config", "~> 6.0"
14
+ # end
15
+ #
11
16
  # appraise 'rails-5.2' do
12
17
  # gem 'rails', '~> 5.2.0'
13
18
  # gem 'dryer-config', '~> 5.2.0'
14
19
  # end
15
-
20
+ #
16
21
  # appraise 'rails-5.0' do
17
22
  # gem 'rails', '~> 5.0.0'
18
23
  # gem 'dryer-config', '~> 5.0.0'
19
24
  # end
20
-
21
- # appraise 'rails-4.1' do
22
- # gem 'rails', '= 4.1.1'
23
- ## gem 'dryer-config', '~> 5.1.0'
24
- # end
data/Gemfile CHANGED
@@ -5,7 +5,7 @@ gem "rails"
5
5
 
6
6
  group :test do
7
7
  gem "observr"
8
- gem "standard", require: false
9
- gem "simplecov", require: false
10
8
  gem "ricecream"
9
+ gem "simplecov", require: false
10
+ gem "standard", require: false
11
11
  end
data/MIT-LICENSE CHANGED
@@ -1,4 +1,6 @@
1
- Copyright 2010-2022 Dittmar Krall - www.matiq.com
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2010-2023 Dittmar Krall (www.matiq.com)
2
4
 
3
5
  Permission is hereby granted, free of charge, to any person obtaining
4
6
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,14 +1,21 @@
1
- ActWithBag
2
- ==========
3
- [![Gem Version](https://badge.fury.io/rb/act_with_bag.png)](http://badge.fury.io/rb/act_with_bag)
4
-
5
- In Gemfile:
1
+ # ActWithBag
6
2
 
7
- gem 'act_with_bag'
3
+ [![Gem Version](https://badge.fury.io/rb/act_with_bag.png)](http://badge.fury.io/rb/act_with_bag)
8
4
 
9
5
  Bag helps when fields in a Rails database table are not yet settled down
10
6
  or when many fields without business logic are required.
11
7
 
8
+ ## Installation
9
+
10
+ As usual:
11
+ ```ruby
12
+ # Gemfile
13
+ gem "act_with_bag"
14
+ ```
15
+ and run "bundle install".
16
+
17
+ ## Usage
18
+
12
19
  Install (migrate) one bag as a text field in a table to collect many fields.
13
20
  Additional fields or removal of them are easy;
14
21
  no migrations are required for them.
@@ -36,8 +43,7 @@ Obsolete fields are deleted before_save by:
36
43
  delete_from_bag :field
37
44
 
38
45
 
39
- Warning
40
- =======
46
+ ## Warning
41
47
 
42
48
  1. Please add a:
43
49
 
@@ -68,8 +74,7 @@ The configuration
68
74
  may be incomplete requiring additional classes like "Time" and "Date".
69
75
  (credits to Martin Sch�ttler).
70
76
 
71
- Example
72
- =======
77
+ ## Example
73
78
 
74
79
  In model:
75
80
 
@@ -103,9 +108,13 @@ In controller:
103
108
  params = Order.merge(@order.bag, self.params) # only if type :date is being used
104
109
  @order.update_attributes(params[:order])
105
110
 
106
- Test
107
- ====
111
+ ## Test
112
+
113
+ bundle exec rake
114
+
115
+ ## Miscellaneous
108
116
 
109
- rake
117
+ Copyright (c) 2009-2023 Dittmar Krall (www.matiq.com),
118
+ released under the MIT license:
110
119
 
111
- Copyright (c) 2009-2022 [Dittmar Krall], released under the MIT license
120
+ * https://opensource.org/licenses/MIT
@@ -1,5 +1,6 @@
1
1
  module ActWithBag
2
- VERSION = "1.1.1" # 2022-12-11
2
+ VERSION = "1.1.2" # 2023-04-22
3
+ # VERSION = "1.1.1" # 2022-12-11
3
4
  # VERSION = "1.1.0" # 2022-08-07
4
5
  # VERSION = "1.0.4" # 2021-06-17
5
6
  # VERSION = "1.0.3" # 2021-05-18
data/lib/act_with_bag.rb CHANGED
@@ -11,7 +11,7 @@ class << ActiveRecord::Base
11
11
  #bag changes disabled as it must be handled by Bag himself
12
12
  end
13
13
  end
14
- }, __FILE__, __LINE__ - 4
14
+ }, __FILE__, __LINE__ - 6
15
15
 
16
16
  @baggies_date ||= {}
17
17
  baglets.each { |b|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: act_with_bag
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dittmar Krall
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-11 00:00:00.000000000 Z
11
+ date: 2023-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -105,7 +105,6 @@ files:
105
105
  - ".gitignore"
106
106
  - ".ruby-gemset"
107
107
  - ".ruby-version"
108
- - ".watchr"
109
108
  - Appraisals
110
109
  - Gemfile
111
110
  - MIT-LICENSE
@@ -150,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
149
  - !ruby/object:Gem::Version
151
150
  version: '0'
152
151
  requirements: []
153
- rubygems_version: 3.3.26
152
+ rubygems_version: 3.4.10
154
153
  signing_key:
155
154
  specification_version: 4
156
155
  summary: act_with_bag (baggies) gem
data/.watchr DELETED
@@ -1,61 +0,0 @@
1
- TESTING = %w[test]
2
- HH = "#" * 22 unless defined?(HH)
3
- H = "#" * 5 unless defined?(H)
4
-
5
- def usage
6
- puts <<-EOS
7
- Ctrl-\\ or ctrl-4 Running all tests
8
- Ctrl-C Exit
9
- EOS
10
- end
11
-
12
- def run(cmd)
13
- puts "#{HH} #{Time.now} #{HH}"
14
- puts "#{H} #{cmd}"
15
- system "/usr/bin/time --format '#{HH} Elapsed time %E' #{cmd}"
16
- end
17
-
18
- def run_it(type, files)
19
- files.split(" ").flatten.each do |file|
20
- case type
21
- when "test" then run %(bundle exec ruby -I test #{file})
22
- # when 'spec'; run %(rspec -X #{file})
23
- else; puts "#{H} unknown type: #{type}, file: #{file}"
24
- end
25
- end
26
- end
27
-
28
- def run_all_tests
29
- puts "\n#{HH} Running all tests #{HH}\n"
30
- TESTING.each { |dir| run "bundle exec rake #{dir}" if File.exist?(dir) }
31
- end
32
-
33
- def run_matching_files(base)
34
- base = base.split("_").first
35
- TESTING.each { |type|
36
- files = Dir["#{type}/**/*.rb"].select { |file| file =~ /#{base}_.*\.rb/ }
37
- run_it type, files.join(" ") unless files.empty?
38
- }
39
- end
40
-
41
- TESTING.each { |type|
42
- watch("#{type}/#{type}_helper\.rb") { run_all_tests }
43
- watch("lib/.*\.rb") { run_all_tests }
44
- watch("#{type}/.*/*_#{type}\.rb") { |match| run_it type, match[0] }
45
- watch("#{type}/data/(.*)\.rb") { |match|
46
- m1 = match[1]
47
- run_matching_files("#{type}/#{m1}/#{m1}_#{type}.rb")
48
- }
49
- }
50
-
51
- %w[rb erb haml slim].each { |type|
52
- watch(".*/(.*)\.#{type}") { |match|
53
- run_matching_files(match[1])
54
- }
55
- }
56
-
57
- # Ctrl-\ or ctrl-4
58
- Signal.trap("QUIT") { run_all_tests }
59
- # Ctrl-C
60
- Signal.trap("INT") { abort("Interrupted\n") }
61
- usage