ryanair_ruby 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 26256fbbdcda39ee22561ad524aacb344e564a81074525e74598ff1aec6cf329
4
+ data.tar.gz: 6609ce905603104cd66b9b41d419aa0bfb0db87332f58f3eceaa22936c9234c9
5
+ SHA512:
6
+ metadata.gz: 25b536a1cdc68d5b34fe28fd8d831a0fc028e035a4cb43cd2095c396b97f2dcd511ea6cbcc381420bdffb731a9d296b7e07a831e73c70ee95e6b8e533bdc3dd4
7
+ data.tar.gz: 28955b9787e96aceef1fbc0fa371ce98456a6b77ebac1598a611a7e4cfe19858c7b0b51900d6f489e4c685d7a0a044432f3b038dc726a6fdb7102ee1ae3ee183
data/.idea/.gitignore ADDED
@@ -0,0 +1,10 @@
1
+ # Default ignored files
2
+ /shelf/
3
+ /workspace.xml
4
+ # Ignored default folder with query files
5
+ /queries/
6
+ # Datasource local storage ignored files
7
+ /dataSources/
8
+ /dataSources.local.xml
9
+ # Editor-based HTTP Client requests
10
+ /httpRequests/
data/.idea/modules.xml ADDED
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/ryanair_ruby.iml" filepath="$PROJECT_DIR$/.idea/ryanair_ruby.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
@@ -0,0 +1,56 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="RUBY_MODULE" version="4">
3
+ <component name="ModuleRunConfigurationManager">
4
+ <shared />
5
+ </component>
6
+ <component name="NewModuleRootManager">
7
+ <content url="file://$MODULE_DIR$">
8
+ <sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
9
+ <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
10
+ <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
11
+ </content>
12
+ <orderEntry type="jdk" jdkName="mise: 3.4.8" jdkType="RUBY_SDK" />
13
+ <orderEntry type="sourceFolder" forTests="false" />
14
+ <orderEntry type="library" scope="PROVIDED" name="addressable (v2.8.8, mise: 3.4.8) [gem]" level="application" />
15
+ <orderEntry type="library" scope="PROVIDED" name="ast (v2.4.3, mise: 3.4.8) [gem]" level="application" />
16
+ <orderEntry type="library" scope="PROVIDED" name="bigdecimal (v4.0.1, mise: 3.4.8) [gem]" level="application" />
17
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v2.6.9, mise: 3.4.8) [gem]" level="application" />
18
+ <orderEntry type="library" scope="PROVIDED" name="crack (v1.0.1, mise: 3.4.8) [gem]" level="application" />
19
+ <orderEntry type="library" scope="PROVIDED" name="date (v3.5.1, mise: 3.4.8) [gem]" level="application" />
20
+ <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.6.2, mise: 3.4.8) [gem]" level="application" />
21
+ <orderEntry type="library" scope="PROVIDED" name="erb (v6.0.1, mise: 3.4.8) [gem]" level="application" />
22
+ <orderEntry type="library" scope="PROVIDED" name="hashdiff (v1.2.1, mise: 3.4.8) [gem]" level="application" />
23
+ <orderEntry type="library" scope="PROVIDED" name="io-console (v0.8.2, mise: 3.4.8) [gem]" level="application" />
24
+ <orderEntry type="library" scope="TEST" name="irb (v1.16.0, mise: 3.4.8) [gem]" level="application" />
25
+ <orderEntry type="library" scope="PROVIDED" name="json (v2.18.0, mise: 3.4.8) [gem]" level="application" />
26
+ <orderEntry type="library" scope="PROVIDED" name="language_server-protocol (v3.17.0.5, mise: 3.4.8) [gem]" level="application" />
27
+ <orderEntry type="library" scope="PROVIDED" name="lint_roller (v1.1.0, mise: 3.4.8) [gem]" level="application" />
28
+ <orderEntry type="library" scope="PROVIDED" name="parallel (v1.27.0, mise: 3.4.8) [gem]" level="application" />
29
+ <orderEntry type="library" scope="PROVIDED" name="parser (v3.3.10.1, mise: 3.4.8) [gem]" level="application" />
30
+ <orderEntry type="library" scope="PROVIDED" name="pp (v0.6.3, mise: 3.4.8) [gem]" level="application" />
31
+ <orderEntry type="library" scope="PROVIDED" name="prettyprint (v0.2.0, mise: 3.4.8) [gem]" level="application" />
32
+ <orderEntry type="library" scope="PROVIDED" name="prism (v1.8.0, mise: 3.4.8) [gem]" level="application" />
33
+ <orderEntry type="library" scope="PROVIDED" name="psych (v5.3.1, mise: 3.4.8) [gem]" level="application" />
34
+ <orderEntry type="library" scope="PROVIDED" name="public_suffix (v7.0.2, mise: 3.4.8) [gem]" level="application" />
35
+ <orderEntry type="library" scope="PROVIDED" name="racc (v1.8.1, mise: 3.4.8) [gem]" level="application" />
36
+ <orderEntry type="library" scope="PROVIDED" name="rainbow (v3.1.1, mise: 3.4.8) [gem]" level="application" />
37
+ <orderEntry type="library" scope="TEST" name="rake (v13.3.1, mise: 3.4.8) [gem]" level="application" />
38
+ <orderEntry type="library" scope="PROVIDED" name="rdoc (v7.1.0, mise: 3.4.8) [gem]" level="application" />
39
+ <orderEntry type="library" scope="PROVIDED" name="regexp_parser (v2.11.3, mise: 3.4.8) [gem]" level="application" />
40
+ <orderEntry type="library" scope="PROVIDED" name="reline (v0.6.3, mise: 3.4.8) [gem]" level="application" />
41
+ <orderEntry type="library" scope="PROVIDED" name="rexml (v3.4.4, mise: 3.4.8) [gem]" level="application" />
42
+ <orderEntry type="library" scope="TEST" name="rspec (v3.13.2, mise: 3.4.8) [gem]" level="application" />
43
+ <orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.13.6, mise: 3.4.8) [gem]" level="application" />
44
+ <orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.13.5, mise: 3.4.8) [gem]" level="application" />
45
+ <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.13.7, mise: 3.4.8) [gem]" level="application" />
46
+ <orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.13.6, mise: 3.4.8) [gem]" level="application" />
47
+ <orderEntry type="library" scope="TEST" name="rubocop (v1.82.1, mise: 3.4.8) [gem]" level="application" />
48
+ <orderEntry type="library" scope="PROVIDED" name="rubocop-ast (v1.49.0, mise: 3.4.8) [gem]" level="application" />
49
+ <orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.13.0, mise: 3.4.8) [gem]" level="application" />
50
+ <orderEntry type="library" scope="PROVIDED" name="stringio (v3.2.0, mise: 3.4.8) [gem]" level="application" />
51
+ <orderEntry type="library" scope="PROVIDED" name="tsort (v0.2.0, mise: 3.4.8) [gem]" level="application" />
52
+ <orderEntry type="library" scope="PROVIDED" name="unicode-display_width (v3.2.0, mise: 3.4.8) [gem]" level="application" />
53
+ <orderEntry type="library" scope="PROVIDED" name="unicode-emoji (v4.2.0, mise: 3.4.8) [gem]" level="application" />
54
+ <orderEntry type="library" scope="TEST" name="webmock (v3.26.1, mise: 3.4.8) [gem]" level="application" />
55
+ </component>
56
+ </module>
data/.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="" vcs="Git" />
5
+ </component>
6
+ </project>
data/.output.txt ADDED
@@ -0,0 +1,296 @@
1
+ == spec/ryanair_ruby/client_spec.rb ==
2
+ C: 9:121: Layout/LineLength: Line is too long. [144/120]
3
+ C: 19:121: Layout/LineLength: Line is too long. [141/120]
4
+ == spec/ryanair_ruby/resources/booking_availabilities_spec.rb ==
5
+ C: 3: 1: Metrics/BlockLength: Block has too many lines. [32/25]
6
+ C: 7: 3: Metrics/BlockLength: Block has too many lines. [28/25]
7
+ 16 files inspected, 4 offenses detected
8
+ The following cops were added to RuboCop, but are not configured. Please set Enabled to either `true` or `false` in your `.rubocop.yml` file.
9
+ Please also note that you can opt-in to new cops by default by adding this to your config:
10
+ AllCops:
11
+ NewCops: enable
12
+ Gemspec/AddRuntimeDependency: # new in 1.65
13
+ Enabled: true
14
+ Gemspec/AttributeAssignment: # new in 1.77
15
+ Enabled: true
16
+ Gemspec/DeprecatedAttributeAssignment: # new in 1.30
17
+ Enabled: true
18
+ Gemspec/DevelopmentDependencies: # new in 1.44
19
+ Enabled: true
20
+ Gemspec/RequireMFA: # new in 1.23
21
+ Enabled: true
22
+ Layout/EmptyLinesAfterModuleInclusion: # new in 1.79
23
+ Enabled: true
24
+ Layout/LineContinuationLeadingSpace: # new in 1.31
25
+ Enabled: true
26
+ Layout/LineContinuationSpacing: # new in 1.31
27
+ Enabled: true
28
+ Layout/LineEndStringConcatenationIndentation: # new in 1.18
29
+ Enabled: true
30
+ Layout/SpaceBeforeBrackets: # new in 1.7
31
+ Enabled: true
32
+ Lint/AmbiguousAssignment: # new in 1.7
33
+ Enabled: true
34
+ Lint/AmbiguousOperatorPrecedence: # new in 1.21
35
+ Enabled: true
36
+ Lint/AmbiguousRange: # new in 1.19
37
+ Enabled: true
38
+ Lint/ArrayLiteralInRegexp: # new in 1.71
39
+ Enabled: true
40
+ Lint/ConstantOverwrittenInRescue: # new in 1.31
41
+ Enabled: true
42
+ Lint/ConstantReassignment: # new in 1.70
43
+ Enabled: true
44
+ Lint/CopDirectiveSyntax: # new in 1.72
45
+ Enabled: true
46
+ Lint/DeprecatedConstants: # new in 1.8
47
+ Enabled: true
48
+ Lint/DuplicateBranch: # new in 1.3
49
+ Enabled: true
50
+ Lint/DuplicateMagicComment: # new in 1.37
51
+ Enabled: true
52
+ Lint/DuplicateMatchPattern: # new in 1.50
53
+ Enabled: true
54
+ Lint/DuplicateRegexpCharacterClassElement: # new in 1.1
55
+ Enabled: true
56
+ Lint/DuplicateSetElement: # new in 1.67
57
+ Enabled: true
58
+ Lint/EmptyBlock: # new in 1.1
59
+ Enabled: true
60
+ Lint/EmptyClass: # new in 1.3
61
+ Enabled: true
62
+ Lint/EmptyInPattern: # new in 1.16
63
+ Enabled: true
64
+ Lint/HashNewWithKeywordArgumentsAsDefault: # new in 1.69
65
+ Enabled: true
66
+ Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
67
+ Enabled: true
68
+ Lint/ItWithoutArgumentsInBlock: # new in 1.59
69
+ Enabled: true
70
+ Lint/LambdaWithoutLiteralBlock: # new in 1.8
71
+ Enabled: true
72
+ Lint/LiteralAssignmentInCondition: # new in 1.58
73
+ Enabled: true
74
+ Lint/MixedCaseRange: # new in 1.53
75
+ Enabled: true
76
+ Lint/NoReturnInBeginEndBlocks: # new in 1.2
77
+ Enabled: true
78
+ Lint/NonAtomicFileOperation: # new in 1.31
79
+ Enabled: true
80
+ Lint/NumberedParameterAssignment: # new in 1.9
81
+ Enabled: true
82
+ Lint/NumericOperationWithConstantResult: # new in 1.69
83
+ Enabled: true
84
+ Lint/OrAssignmentToConstant: # new in 1.9
85
+ Enabled: true
86
+ Lint/RedundantDirGlobSort: # new in 1.8
87
+ Enabled: true
88
+ Lint/RedundantRegexpQuantifiers: # new in 1.53
89
+ Enabled: true
90
+ Lint/RedundantTypeConversion: # new in 1.72
91
+ Enabled: true
92
+ Lint/RefinementImportMethods: # new in 1.27
93
+ Enabled: true
94
+ Lint/RequireRangeParentheses: # new in 1.32
95
+ Enabled: true
96
+ Lint/RequireRelativeSelfPath: # new in 1.22
97
+ Enabled: true
98
+ Lint/SharedMutableDefault: # new in 1.70
99
+ Enabled: true
100
+ Lint/SuppressedExceptionInNumberConversion: # new in 1.72
101
+ Enabled: true
102
+ Lint/SymbolConversion: # new in 1.9
103
+ Enabled: true
104
+ Lint/ToEnumArguments: # new in 1.1
105
+ Enabled: true
106
+ Lint/TripleQuotes: # new in 1.9
107
+ Enabled: true
108
+ Lint/UnescapedBracketInRegexp: # new in 1.68
109
+ Enabled: true
110
+ Lint/UnexpectedBlockArity: # new in 1.5
111
+ Enabled: true
112
+ Lint/UnmodifiedReduceAccumulator: # new in 1.1
113
+ Enabled: true
114
+ Lint/UselessConstantScoping: # new in 1.72
115
+ Enabled: true
116
+ Lint/UselessDefaultValueArgument: # new in 1.76
117
+ Enabled: true
118
+ Lint/UselessDefined: # new in 1.69
119
+ Enabled: true
120
+ Lint/UselessNumericOperation: # new in 1.66
121
+ Enabled: true
122
+ Lint/UselessOr: # new in 1.76
123
+ Enabled: true
124
+ Lint/UselessRescue: # new in 1.43
125
+ Enabled: true
126
+ Lint/UselessRuby2Keywords: # new in 1.23
127
+ Enabled: true
128
+ Metrics/CollectionLiteralLength: # new in 1.47
129
+ Enabled: true
130
+ Naming/BlockForwarding: # new in 1.24
131
+ Enabled: true
132
+ Naming/PredicateMethod: # new in 1.76
133
+ Enabled: true
134
+ Security/CompoundHash: # new in 1.28
135
+ Enabled: true
136
+ Security/IoMethods: # new in 1.22
137
+ Enabled: true
138
+ Style/AmbiguousEndlessMethodDefinition: # new in 1.68
139
+ Enabled: true
140
+ Style/ArgumentsForwarding: # new in 1.1
141
+ Enabled: true
142
+ Style/ArrayIntersect: # new in 1.40
143
+ Enabled: true
144
+ Style/ArrayIntersectWithSingleElement: # new in 1.81
145
+ Enabled: true
146
+ Style/BitwisePredicate: # new in 1.68
147
+ Enabled: true
148
+ Style/CollectionCompact: # new in 1.2
149
+ Enabled: true
150
+ Style/CollectionQuerying: # new in 1.77
151
+ Enabled: true
152
+ Style/CombinableDefined: # new in 1.68
153
+ Enabled: true
154
+ Style/ComparableBetween: # new in 1.74
155
+ Enabled: true
156
+ Style/ComparableClamp: # new in 1.44
157
+ Enabled: true
158
+ Style/ConcatArrayLiterals: # new in 1.41
159
+ Enabled: true
160
+ Style/DataInheritance: # new in 1.49
161
+ Enabled: true
162
+ Style/DigChain: # new in 1.69
163
+ Enabled: true
164
+ Style/DirEmpty: # new in 1.48
165
+ Enabled: true
166
+ Style/DocumentDynamicEvalDefinition: # new in 1.1
167
+ Enabled: true
168
+ Style/EmptyHeredoc: # new in 1.32
169
+ Enabled: true
170
+ Style/EmptyStringInsideInterpolation: # new in 1.76
171
+ Enabled: true
172
+ Style/EndlessMethod: # new in 1.8
173
+ Enabled: true
174
+ Style/EnvHome: # new in 1.29
175
+ Enabled: true
176
+ Style/ExactRegexpMatch: # new in 1.51
177
+ Enabled: true
178
+ Style/FetchEnvVar: # new in 1.28
179
+ Enabled: true
180
+ Style/FileEmpty: # new in 1.48
181
+ Enabled: true
182
+ Style/FileNull: # new in 1.69
183
+ Enabled: true
184
+ Style/FileRead: # new in 1.24
185
+ Enabled: true
186
+ Style/FileTouch: # new in 1.69
187
+ Enabled: true
188
+ Style/FileWrite: # new in 1.24
189
+ Enabled: true
190
+ Style/HashConversion: # new in 1.10
191
+ Enabled: true
192
+ Style/HashExcept: # new in 1.7
193
+ Enabled: true
194
+ Style/HashFetchChain: # new in 1.75
195
+ Enabled: true
196
+ Style/HashSlice: # new in 1.71
197
+ Enabled: true
198
+ Style/IfWithBooleanLiteralBranches: # new in 1.9
199
+ Enabled: true
200
+ Style/InPatternThen: # new in 1.16
201
+ Enabled: true
202
+ Style/ItAssignment: # new in 1.70
203
+ Enabled: true
204
+ Style/ItBlockParameter: # new in 1.75
205
+ Enabled: true
206
+ Style/KeywordArgumentsMerging: # new in 1.68
207
+ Enabled: true
208
+ Style/MagicCommentFormat: # new in 1.35
209
+ Enabled: true
210
+ Style/MapCompactWithConditionalBlock: # new in 1.30
211
+ Enabled: true
212
+ Style/MapIntoArray: # new in 1.63
213
+ Enabled: true
214
+ Style/MapToHash: # new in 1.24
215
+ Enabled: true
216
+ Style/MapToSet: # new in 1.42
217
+ Enabled: true
218
+ Style/MinMaxComparison: # new in 1.42
219
+ Enabled: true
220
+ Style/ModuleMemberExistenceCheck: # new in 1.82
221
+ Enabled: true
222
+ Style/MultilineInPatternThen: # new in 1.16
223
+ Enabled: true
224
+ Style/NegatedIfElseCondition: # new in 1.2
225
+ Enabled: true
226
+ Style/NestedFileDirname: # new in 1.26
227
+ Enabled: true
228
+ Style/NilLambda: # new in 1.3
229
+ Enabled: true
230
+ Style/NumberedParameters: # new in 1.22
231
+ Enabled: true
232
+ Style/NumberedParametersLimit: # new in 1.22
233
+ Enabled: true
234
+ Style/ObjectThen: # new in 1.28
235
+ Enabled: true
236
+ Style/OpenStructUse: # new in 1.23
237
+ Enabled: true
238
+ Style/OperatorMethodCall: # new in 1.37
239
+ Enabled: true
240
+ Style/QuotedSymbols: # new in 1.16
241
+ Enabled: true
242
+ Style/RedundantArgument: # new in 1.4
243
+ Enabled: true
244
+ Style/RedundantArrayConstructor: # new in 1.52
245
+ Enabled: true
246
+ Style/RedundantArrayFlatten: # new in 1.76
247
+ Enabled: true
248
+ Style/RedundantConstantBase: # new in 1.40
249
+ Enabled: true
250
+ Style/RedundantCurrentDirectoryInPath: # new in 1.53
251
+ Enabled: true
252
+ Style/RedundantDoubleSplatHashBraces: # new in 1.41
253
+ Enabled: true
254
+ Style/RedundantEach: # new in 1.38
255
+ Enabled: true
256
+ Style/RedundantFilterChain: # new in 1.52
257
+ Enabled: true
258
+ Style/RedundantFormat: # new in 1.72
259
+ Enabled: true
260
+ Style/RedundantHeredocDelimiterQuotes: # new in 1.45
261
+ Enabled: true
262
+ Style/RedundantInitialize: # new in 1.27
263
+ Enabled: true
264
+ Style/RedundantInterpolationUnfreeze: # new in 1.66
265
+ Enabled: true
266
+ Style/RedundantLineContinuation: # new in 1.49
267
+ Enabled: true
268
+ Style/RedundantRegexpArgument: # new in 1.53
269
+ Enabled: true
270
+ Style/RedundantRegexpConstructor: # new in 1.52
271
+ Enabled: true
272
+ Style/RedundantSelfAssignmentBranch: # new in 1.19
273
+ Enabled: true
274
+ Style/RedundantStringEscape: # new in 1.37
275
+ Enabled: true
276
+ Style/ReturnNilInPredicateMethodDefinition: # new in 1.53
277
+ Enabled: true
278
+ Style/SafeNavigationChainLength: # new in 1.68
279
+ Enabled: true
280
+ Style/SelectByRegexp: # new in 1.22
281
+ Enabled: true
282
+ Style/SendWithLiteralMethodName: # new in 1.64
283
+ Enabled: true
284
+ Style/SingleLineDoEndBlock: # new in 1.57
285
+ Enabled: true
286
+ Style/StringChars: # new in 1.12
287
+ Enabled: true
288
+ Style/SuperArguments: # new in 1.64
289
+ Enabled: true
290
+ Style/SuperWithArgsParentheses: # new in 1.58
291
+ Enabled: true
292
+ Style/SwapValues: # new in 1.1
293
+ Enabled: true
294
+ Style/YAMLFileRead: # new in 1.53
295
+ Enabled: true
296
+ For more information: https://docs.rubocop.org/rubocop/versioning.html
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,29 @@
1
+ AllCops:
2
+ TargetRubyVersion: 3.1
3
+ NewCops: enable
4
+
5
+ Layout/LineLength:
6
+ Max: 160
7
+ Exclude:
8
+ - 'spec/**/*'
9
+
10
+ Metrics/BlockLength:
11
+ Exclude:
12
+ - 'spec/**/*'
13
+ - 'ryanair_ruby.gemspec'
14
+
15
+ Style/StringLiterals:
16
+ EnforcedStyle: double_quotes
17
+
18
+ Style/StringLiteralsInInterpolation:
19
+ EnforcedStyle: double_quotes
20
+
21
+ Style/Documentation:
22
+ Enabled: false
23
+
24
+ Metrics/MethodLength:
25
+ Max: 15
26
+ CountAsOne: ['array', 'hash', 'heredoc', 'method_call']
27
+
28
+ Gemspec/RequireMFA:
29
+ Enabled: false
@@ -0,0 +1,132 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, caste, color, religion, or sexual
10
+ identity and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the overall
26
+ community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or advances of
31
+ any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email address,
35
+ without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official email address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ [INSERT CONTACT METHOD].
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series of
86
+ actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or permanent
93
+ ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within the
113
+ community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.1, available at
119
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120
+
121
+ Community Impact Guidelines were inspired by
122
+ [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123
+
124
+ For answers to common questions about this code of conduct, see the FAQ at
125
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126
+ [https://www.contributor-covenant.org/translations][translations].
127
+
128
+ [homepage]: https://www.contributor-covenant.org
129
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130
+ [Mozilla CoC]: https://github.com/mozilla/diversity
131
+ [FAQ]: https://www.contributor-covenant.org/faq
132
+ [translations]: https://www.contributor-covenant.org/translations
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2026 Witek
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # RyanairRuby
2
+
3
+ Unofficial Open Source Ruby gem for Ryanair API.
4
+
5
+ ## Disclaimer
6
+
7
+ >This library is not affiliated, endorsed, or sponsored by Ryanair or any of its affiliates.
8
+ All trademarks related to Ryanair and its affiliates are owned by the relevant companies.
9
+ The author(s) of this library assume no responsibility for any consequences resulting from the use of this library.
10
+ The author(s) of this library also assume no liability for any damages, losses, or expenses that may arise from the use of this library.
11
+ Any use of this library is entirely at the user's own risk.
12
+ It is solely the user's responsibility to ensure compliance with Ryanair's terms of use and any applicable laws and regulations.
13
+ The library is an independent project aimed at providing a convenient way to interact with the Ryanair API, allowing individuals to find flights for personal use, and then ultimately purchase them via Ryanair's website. While the author(s) will make efforts to ensure the library's functionality, they do not guarantee the accuracy, completeness, or timeliness of the information provided.
14
+ The author(s) do not guarantee the availability or continuity of the library, and updates may not be guaranteed.
15
+ Support for this library may be provided at the author(s)'s discretion, but it is not guaranteed.
16
+ Users are encouraged to report any issues or feedback to the author(s) via appropriate channels.
17
+ By using this library, users acknowledge that they have read, understood, and agreed to the terms of this disclaimer.
18
+
19
+ ## Installation
20
+
21
+ TBD
22
+
23
+ ## Usage
24
+
25
+ ```ruby
26
+ require 'ryanair_ruby'
27
+
28
+ client = RyanairRuby::Client.new
29
+
30
+ # Get one-way fare availabilities
31
+ client.one_way_fares("DUB", "STN")
32
+
33
+ # Get booking availability for a specific date
34
+ client.booking_availability("DUB", "STN", "2024-06-01", ADT: 1)
35
+
36
+ # Get cheapest fares per day for a month
37
+ client.cheapest_per_day("DUB", "STN", "2024-06-01", currency: "EUR")
38
+ ```
39
+
40
+ ## Contributing
41
+
42
+ Bug reports and pull requests are welcome on GitHub at https://github.com/wkl/ryanair_ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/wkl/ryanair_ruby/blob/main/CODE_OF_CONDUCT.md).
43
+
44
+ ## License
45
+
46
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
47
+
48
+ ## Code of Conduct
49
+
50
+ Everyone interacting in the RyanairRuby project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/wkl/ryanair_ruby/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RyanairRuby
4
+ class Client
5
+ attr_reader :connection
6
+
7
+ def initialize(base_url: "https://www.ryanair.com/api/", timeout: HTTP::DEFAULT_TIMEOUT, open_timeout: HTTP::DEFAULT_OPEN_TIMEOUT)
8
+ @connection = HTTP.new(base_url: base_url, timeout: timeout, open_timeout: open_timeout)
9
+ end
10
+
11
+ def one_way_fares(origin, destination, **params)
12
+ Resources::OneWayFareAvailabilities.new(connection: connection).list(origin, destination, params)
13
+ end
14
+
15
+ def booking_availability(origin, destination, date_out, **params)
16
+ Resources::BookingAvailabilities.new(connection: connection).list(origin, destination, date_out, params)
17
+ end
18
+
19
+ def cheapest_per_day(origin, destination, outbound_month_of_date, **params)
20
+ Resources::OneWayFareCheapestPerDay.new(connection: connection).list(origin, destination, outbound_month_of_date, params)
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,109 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "net/http"
4
+ require "json"
5
+ require "uri"
6
+
7
+ module RyanairRuby
8
+ module Errors
9
+ class Error < StandardError
10
+ attr_reader :status, :body, :headers
11
+
12
+ def initialize(message = nil, status: nil, body: nil, headers: nil, cause: nil)
13
+ super(message)
14
+ @status = status
15
+ @body = body
16
+ @headers = headers
17
+ set_backtrace(cause.backtrace) if cause
18
+ end
19
+ end
20
+
21
+ class ConnectionError < Error; end
22
+ class TimeoutError < Error; end
23
+ class ParsingError < Error; end
24
+ end
25
+
26
+ class HTTP
27
+ DEFAULT_TIMEOUT = 10
28
+ DEFAULT_OPEN_TIMEOUT = 5
29
+
30
+ def initialize(base_url:, timeout: DEFAULT_TIMEOUT, open_timeout: DEFAULT_OPEN_TIMEOUT, headers: {})
31
+ @base_uri = URI(base_url)
32
+ @timeout = timeout
33
+ @open_timeout = open_timeout
34
+ @headers = headers
35
+ end
36
+
37
+ def get(path, params: {}, headers: {})
38
+ uri = build_uri(path, params)
39
+
40
+ req = Net::HTTP::Get.new(uri)
41
+ req["Accept"] = "application/json"
42
+ req["User-Agent"] = "ryanair-ruby/#{RyanairRuby::VERSION}"
43
+
44
+ @headers.each { |k, v| req[k] = v }
45
+ headers.each { |k, v| req[k] = v }
46
+
47
+ res = perform(uri, req)
48
+ handle_response(res)
49
+ end
50
+
51
+ private
52
+
53
+ def build_uri(path, params)
54
+ # Ensure we correctly join base_url + path
55
+ uri = @base_uri.dup
56
+ uri.path = join_paths(@base_uri.path, path)
57
+
58
+ if params && !params.empty?
59
+ # Merge with any existing query on base_url
60
+ existing = uri.query ? URI.decode_www_form(uri.query) : []
61
+ merged = existing + params.to_a
62
+ uri.query = URI.encode_www_form(merged)
63
+ end
64
+
65
+ uri
66
+ end
67
+
68
+ def join_paths(base_path, extra_path)
69
+ extra = extra_path.start_with?("/") ? extra_path : "/#{extra_path}"
70
+ (base_path.end_with?("/") ? base_path.chomp("/") : base_path) + extra
71
+ end
72
+
73
+ def perform(uri, req)
74
+ Net::HTTP.start(
75
+ uri.host,
76
+ uri.port,
77
+ use_ssl: uri.scheme == "https",
78
+ open_timeout: @open_timeout,
79
+ read_timeout: @timeout
80
+ ) do |http|
81
+ http.request(req)
82
+ end
83
+ rescue Timeout::Error => e
84
+ raise Errors::TimeoutError.new("Request timed out", cause: e)
85
+ rescue SocketError, SystemCallError, IOError => e
86
+ raise Errors::ConnectionError.new("Connection failed", cause: e)
87
+ end
88
+
89
+ def handle_response(res)
90
+ headers = res.each_header.to_h
91
+ body = res.body.to_s
92
+
93
+ case res.code.to_i
94
+ when 200
95
+ parse_json(body)
96
+ else
97
+ raise Errors::Error.new("Unexpected status #{res.code}", status: res.code.to_i, body: body, headers: headers)
98
+ end
99
+ end
100
+
101
+ def parse_json(body)
102
+ return nil if body.empty?
103
+
104
+ JSON.parse(body, symbolize_names: true)
105
+ rescue JSON::ParserError => e
106
+ raise Errors::ParsingError.new("Invalid JSON response", cause: e)
107
+ end
108
+ end
109
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RyanairRuby
4
+ module Resources
5
+ class Base
6
+ attr_reader :connection
7
+
8
+ def initialize(connection:)
9
+ @connection = connection
10
+ end
11
+
12
+ private
13
+
14
+ def get(path, params: {}, headers: {})
15
+ connection.get(path, params: params, headers: headers)
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RyanairRuby
4
+ module Resources
5
+ class BookingAvailabilities < Base
6
+ def list(origin, destination, date_out, params = {})
7
+ query_params = {
8
+ Origin: origin,
9
+ Destination: destination,
10
+ DateOut: date_out,
11
+ ToUs: "AGREED"
12
+ }.merge(params)
13
+
14
+ get("booking/v4/en-gb/availability", params: query_params)
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RyanairRuby
4
+ module Resources
5
+ class OneWayFareCheapestPerDay < Base
6
+ def list(origin, destination, outbound_month_of_date, params = {})
7
+ query_params = {
8
+ outboundMonthOfDate: outbound_month_of_date
9
+ }.merge(params)
10
+
11
+ get("farfnd/v4/oneWayFares/#{origin}/#{destination}/cheapestPerDay", params: query_params)
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RyanairRuby
4
+ module Resources
5
+ class OneWayFareAvailabilities < Base
6
+ def list(origin, destination, params = {})
7
+ get("farfnd/v4/oneWayFares/#{origin}/#{destination}/availabilities", params: params)
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RyanairRuby
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "ryanair_ruby/version"
4
+ require_relative "ryanair_ruby/http"
5
+ require_relative "ryanair_ruby/client"
6
+ require_relative "ryanair_ruby/resources/base"
7
+ require_relative "ryanair_ruby/resources/one_way_fares_availabilities"
8
+ require_relative "ryanair_ruby/resources/one_way_fare_cheapest_per_day"
9
+ require_relative "ryanair_ruby/resources/booking_availabilities"
10
+
11
+ module RyanairRuby
12
+ class Error < StandardError; end
13
+ end
metadata ADDED
@@ -0,0 +1,63 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ryanair_ruby
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Witek
8
+ bindir: exe
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies: []
12
+ description: A lightweight Ruby gem for interacting with the Ryanair API, allowing
13
+ you to search for flights and check availabilities.
14
+ email:
15
+ - wkl@keepit.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - ".idea/.gitignore"
21
+ - ".idea/modules.xml"
22
+ - ".idea/ryanair_ruby.iml"
23
+ - ".idea/vcs.xml"
24
+ - ".output.txt"
25
+ - ".rspec"
26
+ - ".rubocop.yml"
27
+ - CODE_OF_CONDUCT.md
28
+ - LICENSE.txt
29
+ - README.md
30
+ - Rakefile
31
+ - lib/ryanair_ruby.rb
32
+ - lib/ryanair_ruby/client.rb
33
+ - lib/ryanair_ruby/http.rb
34
+ - lib/ryanair_ruby/resources/base.rb
35
+ - lib/ryanair_ruby/resources/booking_availabilities.rb
36
+ - lib/ryanair_ruby/resources/one_way_fare_cheapest_per_day.rb
37
+ - lib/ryanair_ruby/resources/one_way_fares_availabilities.rb
38
+ - lib/ryanair_ruby/version.rb
39
+ homepage: https://github.com/wkl/ryanair_ruby
40
+ licenses:
41
+ - MIT
42
+ metadata:
43
+ homepage_uri: https://github.com/wkl/ryanair_ruby
44
+ source_code_uri: https://github.com/wkl/ryanair_ruby
45
+ changelog_uri: https://github.com/wkl/ryanair_ruby/blob/master/CHANGELOG.md
46
+ rdoc_options: []
47
+ require_paths:
48
+ - lib
49
+ required_ruby_version: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: 3.1.0
54
+ required_rubygems_version: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ version: '0'
59
+ requirements: []
60
+ rubygems_version: 3.6.9
61
+ specification_version: 4
62
+ summary: A Ruby client for the Ryanair API.
63
+ test_files: []