eitil 2.0.3 → 2.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -1
- data/lib/eitil/all.rb +0 -1
- data/lib/eitil/railtie.rb +1 -1
- data/lib/eitil/version.rb +1 -1
- data/spec/dummy_app/app/models/user.rb +0 -25
- data/spec/spec_helper.rb +0 -2
- metadata +2 -30
- data/eitil_integrate/README.md +0 -19
- data/eitil_integrate/lib/eitil_integrate/application_exporter/auto_sum/drop_data.rb +0 -63
- data/eitil_integrate/lib/eitil_integrate/application_exporter/auto_sum/format_data.rb +0 -30
- data/eitil_integrate/lib/eitil_integrate/application_exporter/auto_sum/initialize.rb +0 -22
- data/eitil_integrate/lib/eitil_integrate/application_exporter/auto_sum/present_data.rb +0 -31
- data/eitil_integrate/lib/eitil_integrate/application_exporter/auto_sum/reduce_data.rb +0 -18
- data/eitil_integrate/lib/eitil_integrate/application_exporter/auto_sum/sum_data.rb +0 -84
- data/eitil_integrate/lib/eitil_integrate/application_exporter/auto_sum.rb +0 -10
- data/eitil_integrate/lib/eitil_integrate/application_exporter/default_export.rb +0 -44
- data/eitil_integrate/lib/eitil_integrate/application_exporter/helpers.rb +0 -50
- data/eitil_integrate/lib/eitil_integrate/application_exporter/infos.rb +0 -20
- data/eitil_integrate/lib/eitil_integrate/application_exporter/initialize.rb +0 -32
- data/eitil_integrate/lib/eitil_integrate/application_exporter/log_state.rb +0 -81
- data/eitil_integrate/lib/eitil_integrate/application_exporter/lookups.rb +0 -50
- data/eitil_integrate/lib/eitil_integrate/application_exporter/selectors.rb +0 -58
- data/eitil_integrate/lib/eitil_integrate/application_exporter/setters.rb +0 -27
- data/eitil_integrate/lib/eitil_integrate/application_exporter/store_file.rb +0 -34
- data/eitil_integrate/lib/eitil_integrate/application_exporter/style_cells.rb +0 -104
- data/eitil_integrate/lib/eitil_integrate/application_exporter/validations.rb +0 -28
- data/eitil_integrate/lib/eitil_integrate/application_exporter/write_cells.rb +0 -78
- data/eitil_integrate/lib/eitil_integrate/application_exporter/write_messages.rb +0 -18
- data/eitil_integrate/lib/eitil_integrate/application_exporter.rb +0 -23
- data/eitil_integrate/lib/eitil_integrate/railtie.rb +0 -7
- data/eitil_integrate/lib/eitil_integrate.rb +0 -4
- data/spec/eitil_wrapper/callbacks/helper_methods_spec.rb +0 -34
- data/spec/eitil_wrapper/jobs/single_method_job_spec.rb +0 -72
- data/spec/eitil_wrapper/routes/extended_resources_spec.rb +0 -16
- data/spec/eitil_wrapper/scopes/default_scopes_spec.rb +0 -154
@@ -1,154 +0,0 @@
|
|
1
|
-
|
2
|
-
RSpec.describe "EitilWrapper::Scopes" do
|
3
|
-
|
4
|
-
let(:scopes) { User.singleton_methods(false) }
|
5
|
-
|
6
|
-
context "for columns of datatype: boolean" do
|
7
|
-
|
8
|
-
it "should create the scope .{column_name}_true" do
|
9
|
-
expect(scopes).to include(:confirmed_true)
|
10
|
-
end
|
11
|
-
|
12
|
-
it "should create the scope .{column_name}_false" do
|
13
|
-
expect(scopes).to include(:confirmed_false)
|
14
|
-
end
|
15
|
-
|
16
|
-
end
|
17
|
-
|
18
|
-
context "for columns of datatype: date" do
|
19
|
-
|
20
|
-
it "should create the scope .{column_name}_today" do
|
21
|
-
expect(scopes).to include(:birthday_today)
|
22
|
-
end
|
23
|
-
|
24
|
-
it "should create the scope .{column_name}_past" do
|
25
|
-
expect(scopes).to include(:birthday_past)
|
26
|
-
end
|
27
|
-
|
28
|
-
it "should create the scope .{column_name}_future" do
|
29
|
-
expect(scopes).to include(:birthday_future)
|
30
|
-
end
|
31
|
-
|
32
|
-
it "should create the scope .{column_name}_on_date(date)" do
|
33
|
-
expect(scopes).to include(:birthday_on_date)
|
34
|
-
end
|
35
|
-
|
36
|
-
it "should create the scope .{column_name}_before_date(date)" do
|
37
|
-
expect(scopes).to include(:birthday_before_date)
|
38
|
-
end
|
39
|
-
|
40
|
-
it "should create the scope .{column_name}_after_date(date)" do
|
41
|
-
expect(scopes).to include(:birthday_after_date)
|
42
|
-
end
|
43
|
-
|
44
|
-
it "should create the scope .{column_name}_between_dates(start_date, end_date)" do
|
45
|
-
expect(scopes).to include(:birthday_between_dates)
|
46
|
-
end
|
47
|
-
|
48
|
-
it "should create the scope .{column_name}_oldest_first" do
|
49
|
-
expect(scopes).to include(:birthday_oldest_first)
|
50
|
-
end
|
51
|
-
|
52
|
-
it "should create the scope .{column_name}_newest_first" do
|
53
|
-
expect(scopes).to include(:birthday_newest_first)
|
54
|
-
end
|
55
|
-
|
56
|
-
end
|
57
|
-
|
58
|
-
context "for columns of datatype: datetime" do
|
59
|
-
|
60
|
-
it "should create the scope .{column_name}_today" do
|
61
|
-
expect(scopes).to include(:last_sign_in_today)
|
62
|
-
end
|
63
|
-
|
64
|
-
it "should create the scope .{column_name}_past" do
|
65
|
-
expect(scopes).to include(:last_sign_in_past)
|
66
|
-
end
|
67
|
-
|
68
|
-
it "should create the scope .{column_name}_future" do
|
69
|
-
expect(scopes).to include(:last_sign_in_future)
|
70
|
-
end
|
71
|
-
|
72
|
-
it "should create the scope .{column_name}_on_date(date)" do
|
73
|
-
expect(scopes).to include(:last_sign_in_on_date)
|
74
|
-
end
|
75
|
-
|
76
|
-
it "should create the scope .{column_name}_before_date(date)" do
|
77
|
-
expect(scopes).to include(:last_sign_in_before_date)
|
78
|
-
end
|
79
|
-
|
80
|
-
it "should create the scope .{column_name}_after_date(date)" do
|
81
|
-
expect(scopes).to include(:last_sign_in_after_date)
|
82
|
-
end
|
83
|
-
|
84
|
-
it "should create the scope .{column_name}_between_dates(start_date, end_date)" do
|
85
|
-
expect(scopes).to include(:last_sign_in_between_dates)
|
86
|
-
end
|
87
|
-
|
88
|
-
it "should create the scope .{column_name}_oldest_first" do
|
89
|
-
expect(scopes).to include(:last_sign_in_oldest_first)
|
90
|
-
end
|
91
|
-
|
92
|
-
it "should create the scope .{column_name}_newest_first" do
|
93
|
-
expect(scopes).to include(:last_sign_in_newest_first)
|
94
|
-
end
|
95
|
-
|
96
|
-
end
|
97
|
-
|
98
|
-
context "for columns of datatype: integer" do
|
99
|
-
|
100
|
-
it "should create the scope .{column_name}_equal_to(number)" do
|
101
|
-
expect(scopes).to include(:age_equal_to)
|
102
|
-
end
|
103
|
-
|
104
|
-
it "should create the scope .{column_name}_lower_than(number)" do
|
105
|
-
expect(scopes).to include(:age_lower_than)
|
106
|
-
end
|
107
|
-
|
108
|
-
it "should create the scope .{column_name}_higher_than(number)" do
|
109
|
-
expect(scopes).to include(:age_higher_than)
|
110
|
-
end
|
111
|
-
|
112
|
-
it "should create the scope .{column_name}_between(min, max)" do
|
113
|
-
expect(scopes).to include(:age_between)
|
114
|
-
end
|
115
|
-
|
116
|
-
it "should create the scope .{column_name}_ascending" do
|
117
|
-
expect(scopes).to include(:age_ascending)
|
118
|
-
end
|
119
|
-
|
120
|
-
it "should create the scope .{column_name}_descending" do
|
121
|
-
expect(scopes).to include(:age_descending)
|
122
|
-
end
|
123
|
-
|
124
|
-
end
|
125
|
-
|
126
|
-
context "for columns of datatype: float" do
|
127
|
-
|
128
|
-
it "should create the scope .{column_name}_equal_to(number)" do
|
129
|
-
expect(scopes).to include(:wage_equal_to)
|
130
|
-
end
|
131
|
-
|
132
|
-
it "should create the scope .{column_name}_lower_than(number)" do
|
133
|
-
expect(scopes).to include(:wage_lower_than)
|
134
|
-
end
|
135
|
-
|
136
|
-
it "should create the scope .{column_name}_higher_than(number)" do
|
137
|
-
expect(scopes).to include(:wage_higher_than)
|
138
|
-
end
|
139
|
-
|
140
|
-
it "should create the scope .{column_name}_between(min, max)" do
|
141
|
-
expect(scopes).to include(:wage_between)
|
142
|
-
end
|
143
|
-
|
144
|
-
it "should create the scope .{column_name}_ascending" do
|
145
|
-
expect(scopes).to include(:wage_ascending)
|
146
|
-
end
|
147
|
-
|
148
|
-
it "should create the scope .{column_name}_descending" do
|
149
|
-
expect(scopes).to include(:wage_descending)
|
150
|
-
end
|
151
|
-
|
152
|
-
end
|
153
|
-
|
154
|
-
end
|