orthoses-rails 0.2.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/examples/rails/Rakefile +315 -0
- data/examples/rails/config/database.yml +8 -0
- data/examples/rails/config/storage.yml +3 -0
- data/examples/rails/gemfiles/Gemfile_6_0 +16 -0
- data/examples/rails/gemfiles/Gemfile_6_0.lock +172 -0
- data/examples/rails/gemfiles/Gemfile_6_1 +15 -0
- data/examples/rails/gemfiles/Gemfile_6_1.lock +173 -0
- data/examples/rails/gemfiles/Gemfile_7_0 +15 -0
- data/examples/rails/gemfiles/Gemfile_7_0.lock +172 -0
- data/examples/rails/tasks/active_job.rake +95 -0
- data/examples/rails/tasks/active_model.rake +46 -0
- data/examples/rails/tasks/active_record.rake +83 -0
- data/examples/rails/tasks/active_storage.rake +94 -0
- data/examples/rails/tasks/active_support.rake +92 -0
- data/lib/orthoses/active_model/has_secure_password.rb +12 -5
- data/lib/orthoses/active_model.rb +3 -0
- data/lib/orthoses/active_record/query_methods.rb +32 -0
- data/lib/orthoses/active_record.rb +7 -0
- data/lib/orthoses/active_support/class_attribute.rb +25 -14
- data/lib/orthoses/active_support/configurable.rb +36 -0
- data/lib/orthoses/active_support/delegation.rb +158 -0
- data/lib/orthoses/active_support/mattr_accessor.rb +18 -10
- data/lib/orthoses/active_support/time_with_zone.rb +34 -18
- data/lib/orthoses/active_support.rb +22 -0
- data/lib/orthoses/rails/version.rb +1 -1
- data/lib/orthoses/rails.rb +3 -11
- data/orthoses-rails.gemspec +1 -1
- metadata +25 -8
- data/lib/orthoses/active_support/concern.rb +0 -24
- data/lib/orthoses/active_support/known_sig/active_support/time_with_zone.rbs +0 -4
- data/lib/orthoses/active_support/known_sig/time.rbs +0 -64
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: orthoses-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ksss
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: orthoses
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
19
|
+
version: '0.10'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
26
|
+
version: '0.10'
|
27
27
|
description: Orthoses middleware collection for Ruby on Rails
|
28
28
|
email:
|
29
29
|
- co000ri@gmail.com
|
@@ -34,16 +34,33 @@ files:
|
|
34
34
|
- CODE_OF_CONDUCT.md
|
35
35
|
- LICENSE.txt
|
36
36
|
- README.md
|
37
|
+
- examples/rails/Rakefile
|
38
|
+
- examples/rails/config/database.yml
|
39
|
+
- examples/rails/config/storage.yml
|
40
|
+
- examples/rails/gemfiles/Gemfile_6_0
|
41
|
+
- examples/rails/gemfiles/Gemfile_6_0.lock
|
42
|
+
- examples/rails/gemfiles/Gemfile_6_1
|
43
|
+
- examples/rails/gemfiles/Gemfile_6_1.lock
|
44
|
+
- examples/rails/gemfiles/Gemfile_7_0
|
45
|
+
- examples/rails/gemfiles/Gemfile_7_0.lock
|
46
|
+
- examples/rails/tasks/active_job.rake
|
47
|
+
- examples/rails/tasks/active_model.rake
|
48
|
+
- examples/rails/tasks/active_record.rake
|
49
|
+
- examples/rails/tasks/active_storage.rake
|
50
|
+
- examples/rails/tasks/active_support.rake
|
37
51
|
- lib/orthoses-rails.rb
|
52
|
+
- lib/orthoses/active_model.rb
|
38
53
|
- lib/orthoses/active_model/has_secure_password.rb
|
54
|
+
- lib/orthoses/active_record.rb
|
39
55
|
- lib/orthoses/active_record/belongs_to.rb
|
40
56
|
- lib/orthoses/active_record/generated_attribute_methods.rb
|
41
57
|
- lib/orthoses/active_record/has_many.rb
|
42
58
|
- lib/orthoses/active_record/has_one.rb
|
59
|
+
- lib/orthoses/active_record/query_methods.rb
|
60
|
+
- lib/orthoses/active_support.rb
|
43
61
|
- lib/orthoses/active_support/class_attribute.rb
|
44
|
-
- lib/orthoses/active_support/
|
45
|
-
- lib/orthoses/active_support/
|
46
|
-
- lib/orthoses/active_support/known_sig/time.rbs
|
62
|
+
- lib/orthoses/active_support/configurable.rb
|
63
|
+
- lib/orthoses/active_support/delegation.rb
|
47
64
|
- lib/orthoses/active_support/mattr_accessor.rb
|
48
65
|
- lib/orthoses/active_support/time_with_zone.rb
|
49
66
|
- lib/orthoses/rails.rb
|
@@ -72,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
89
|
- !ruby/object:Gem::Version
|
73
90
|
version: '0'
|
74
91
|
requirements: []
|
75
|
-
rubygems_version: 3.3.
|
92
|
+
rubygems_version: 3.3.16
|
76
93
|
signing_key:
|
77
94
|
specification_version: 4
|
78
95
|
summary: Orthoses middleware collection for Ruby on Rails
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Orthoses
|
4
|
-
module ActiveSupport
|
5
|
-
class Concern
|
6
|
-
def initialize(loader)
|
7
|
-
@loader = loader
|
8
|
-
end
|
9
|
-
|
10
|
-
def call
|
11
|
-
extended = CallTracer.new
|
12
|
-
store = extended.trace(::ActiveSupport::Concern.method(:extended)) do
|
13
|
-
@loader.call
|
14
|
-
end
|
15
|
-
extended.result.each do |method, argument|
|
16
|
-
base_name = Orthoses::Utils.module_name(argument[:base])
|
17
|
-
next unless base_name
|
18
|
-
store[argument[:base].to_s] << "extend ActiveSupport::Concern"
|
19
|
-
end
|
20
|
-
store
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,64 +0,0 @@
|
|
1
|
-
module DateAndTime
|
2
|
-
module Calculations
|
3
|
-
end
|
4
|
-
end
|
5
|
-
module ActiveSupport
|
6
|
-
class TimeZone
|
7
|
-
end
|
8
|
-
class Duration
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
class Time
|
13
|
-
include DateAndTime::Calculations
|
14
|
-
def in_time_zone: (?(ActiveSupport::TimeZone | String) new_zone) -> ::ActiveSupport::TimeWithZone
|
15
|
-
| (false? zone) -> ::Time
|
16
|
-
def +: (ActiveSupport::Duration other) -> self
|
17
|
-
| ...
|
18
|
-
def -: (ActiveSupport::Duration other) -> self
|
19
|
-
| ...
|
20
|
-
alias at_beginning_of_day beginning_of_day
|
21
|
-
alias at_beginning_of_hour beginning_of_hour
|
22
|
-
alias at_beginning_of_minute beginning_of_minute
|
23
|
-
alias at_end_of_day end_of_day
|
24
|
-
alias at_end_of_hour end_of_hour
|
25
|
-
alias at_end_of_minute end_of_minute
|
26
|
-
alias at_midday middle_of_day
|
27
|
-
alias at_middle_of_day middle_of_day
|
28
|
-
alias at_midnight beginning_of_day
|
29
|
-
alias at_noon middle_of_day
|
30
|
-
def beginning_of_day: () -> self
|
31
|
-
def beginning_of_hour: () -> self
|
32
|
-
def beginning_of_minute: () -> self
|
33
|
-
def compare_with_coercion: (untyped other) -> (-1 | 0 | 1 | nil)
|
34
|
-
def compare_without_coercion: (untyped other) -> (-1 | 0 | 1 | nil)
|
35
|
-
def end_of_day: () -> self
|
36
|
-
def end_of_hour: () -> self
|
37
|
-
def end_of_minute: () -> self
|
38
|
-
def eql_with_coercion: (untyped other) -> bool
|
39
|
-
def eql_without_coercion: (untyped other) -> bool
|
40
|
-
alias midday middle_of_day
|
41
|
-
def middle_of_day: () -> self
|
42
|
-
alias midnight beginning_of_day
|
43
|
-
def minus_with_coercion: (Time | self arg0) -> Float
|
44
|
-
| (Numeric arg0) -> self
|
45
|
-
def minus_with_duration: (Time | self arg0) -> Float
|
46
|
-
| (Numeric arg0) -> self
|
47
|
-
def minus_without_coercion: (Time | self arg0) -> Float
|
48
|
-
| (Numeric arg0) -> self
|
49
|
-
def minus_without_duration: (Time | self arg0) -> Float
|
50
|
-
| (Numeric arg0) -> self
|
51
|
-
def next_day: () -> self
|
52
|
-
def next_month: () -> self
|
53
|
-
def next_year: () -> self
|
54
|
-
alias noon middle_of_day
|
55
|
-
def plus_without_duration: (Time | self arg0) -> Float
|
56
|
-
| (Numeric arg0) -> self
|
57
|
-
def prev_day: () -> self
|
58
|
-
def prev_month: () -> self
|
59
|
-
def prev_year: () -> self
|
60
|
-
def seconds_since_midnight: () -> Float
|
61
|
-
def seconds_until_end_of_day: () -> Integer
|
62
|
-
def sec_fraction: () -> (Integer | Rational)
|
63
|
-
def to_default_s: () -> String
|
64
|
-
end
|