app_rail-steps 0.1.0 → 0.2.0

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: 2d7ed99205a9e9db659296754d42ef0bcafa75951e48150e3b8188b0a6113537
4
- data.tar.gz: 0d5e985126744124848932c161b784e7b3728fa856b427a1f4dd4df1b49fe8ee
3
+ metadata.gz: 05520af9b94d34d183d95784402fde8b0cefb9b71520e7797ccdab3f234ae8df
4
+ data.tar.gz: fa3a06a6d49d0642171c2ee5d48959b056c7be54525aa8ebeef520189e7de9a8
5
5
  SHA512:
6
- metadata.gz: b0ec5fbc16e24c054f2d82fba4649bca355e64acd8b2ae08b6ff08c38234cc1983a0d19b02c375c71a42e0e256af5d12ed061101ee31d1eb8a46e1ecc800b076
7
- data.tar.gz: 2300ca3ed13267800e9e463abb4f7ea345800b475c2eed25e9f3f331640af86c04d7cc4c0f4abf3609d89f9b5b350b8fb60313f7d16c8676d47ece5d27c4f919
6
+ metadata.gz: 224bf6ac4499b2481ea842c60a5bebaeff9286991a5ef883dcc3c826abb13718936016dcc27e410ac3acc14b45ec98c05f169c96a625718f2f24be154485dc4b
7
+ data.tar.gz: 5b82dcf069f91016aa318f4fe3f0e5be9c43036b6b1ffb6ba782dc4a82c39a1710e3b361acc12a12af03950cefd86702e0ceae61cd46824a977b94b50dd1eee5
data/Gemfile.lock ADDED
@@ -0,0 +1,55 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ app_rail-steps (0.2.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ ast (2.4.2)
10
+ diff-lcs (1.5.0)
11
+ parallel (1.22.1)
12
+ parser (3.1.2.0)
13
+ ast (~> 2.4.1)
14
+ rainbow (3.1.1)
15
+ rake (13.0.6)
16
+ regexp_parser (2.3.0)
17
+ rexml (3.2.5)
18
+ rspec (3.11.0)
19
+ rspec-core (~> 3.11.0)
20
+ rspec-expectations (~> 3.11.0)
21
+ rspec-mocks (~> 3.11.0)
22
+ rspec-core (3.11.0)
23
+ rspec-support (~> 3.11.0)
24
+ rspec-expectations (3.11.0)
25
+ diff-lcs (>= 1.2.0, < 2.0)
26
+ rspec-support (~> 3.11.0)
27
+ rspec-mocks (3.11.1)
28
+ diff-lcs (>= 1.2.0, < 2.0)
29
+ rspec-support (~> 3.11.0)
30
+ rspec-support (3.11.0)
31
+ rubocop (1.27.0)
32
+ parallel (~> 1.10)
33
+ parser (>= 3.1.0.0)
34
+ rainbow (>= 2.2.2, < 4.0)
35
+ regexp_parser (>= 1.8, < 3.0)
36
+ rexml
37
+ rubocop-ast (>= 1.16.0, < 2.0)
38
+ ruby-progressbar (~> 1.7)
39
+ unicode-display_width (>= 1.4.0, < 3.0)
40
+ rubocop-ast (1.17.0)
41
+ parser (>= 3.1.1.0)
42
+ ruby-progressbar (1.11.0)
43
+ unicode-display_width (2.1.0)
44
+
45
+ PLATFORMS
46
+ arm64-darwin-21
47
+
48
+ DEPENDENCIES
49
+ app_rail-steps!
50
+ rake (~> 13.0)
51
+ rspec (~> 3.0)
52
+ rubocop (~> 1.21)
53
+
54
+ BUNDLED WITH
55
+ 2.3.5
@@ -1,15 +1,18 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module AppRail
2
4
  module Steps
3
5
  module Core
4
6
  module List
5
- def ar_core_list_item(id: self.id, text:, detail_text: nil, sf_symbol_name: nil, material_icon_name: nil, preview_url: nil)
6
- { id: id, text: text, detailText: detail_text, sfSymbolName: sf_symbol_name, materialIconName: material_icon_name, imageURL: preview_url }.compact
7
+ def ar_core_list_item(text:, id: self.id, detail_text: nil, sf_symbol_name: nil, material_icon_name: nil, preview_url: nil)
8
+ { id: id, text: text, detailText: detail_text, sfSymbolName: sf_symbol_name,
9
+ materialIconName: material_icon_name, imageURL: preview_url }.compact
7
10
  end
8
-
9
- def ar_core_list_search_suggestion(id: self.id, text:, section_name:, sf_symbol_name: nil)
10
- {id: id.to_s, text: text, sectionName: section_name, sfSymbolName: sf_symbol_name}.compact
11
+
12
+ def ar_core_list_search_suggestion(text:, section_name:, id: self.id, sf_symbol_name: nil)
13
+ { id: id.to_s, text: text, sectionName: section_name, sfSymbolName: sf_symbol_name }.compact
11
14
  end
12
15
  end
13
16
  end
14
17
  end
15
- end
18
+ end
@@ -1,29 +1,33 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative "core/list"
4
+ require_relative "maps/map"
2
5
 
3
6
  module AppRail
4
7
  module Steps
5
8
  module Displayable
6
-
7
9
  include Steps::Core::List
10
+ include Steps::Maps::Map
11
+
12
+ BUTTON_STYLES = %i[primary outline danger textOnly].freeze
13
+ ON_SUCCESS_OPTIONS = %i[none reload backward forward].freeze
8
14
 
9
- BUTTON_STYLES = [:primary, :outline, :danger, :textOnly]
10
- ON_SUCCESS_OPTIONS = [:none, :reload, :backward, :forward]
11
-
12
15
  private
16
+
13
17
  def validate_on_success!(on_success)
14
- raise 'Unknown on_success action' unless ON_SUCCESS_OPTIONS.include?(on_success)
18
+ raise "Unknown on_success action" unless ON_SUCCESS_OPTIONS.include?(on_success)
15
19
  end
16
-
20
+
17
21
  def validate_button_style!(style)
18
- raise 'Unknown style' unless BUTTON_STYLES.include?(style)
22
+ raise "Unknown style" unless BUTTON_STYLES.include?(style)
19
23
  end
20
24
 
21
25
  def camelcase_converter(string, first_letter: :upper)
22
26
  string = string.split("_").map(&:capitalize).join
23
27
  return string unless first_letter == :lower
24
28
 
25
- string[0].downcase + string[1..-1]
29
+ string[0].downcase + string[1..]
26
30
  end
27
31
  end
28
32
  end
29
- end
33
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AppRail
4
+ module Steps
5
+ module Maps
6
+ module Map
7
+ def ar_maps_map_item(text:, latitude:, longitude:, id: self.id, detail_text: nil)
8
+ { id: id, text: text, latitude: latitude, longitude: longitude, detailText: detail_text }.compact
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module AppRail
4
4
  module Steps
5
- VERSION = "0.1.0"
5
+ VERSION = "0.2.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: app_rail-steps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Brooke-Smith
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-12 00:00:00.000000000 Z
11
+ date: 2022-04-18 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -21,6 +21,7 @@ files:
21
21
  - ".rubocop.yml"
22
22
  - CHANGELOG.md
23
23
  - Gemfile
24
+ - Gemfile.lock
24
25
  - LICENSE.txt
25
26
  - README.md
26
27
  - Rakefile
@@ -28,6 +29,7 @@ files:
28
29
  - lib/app_rail/steps.rb
29
30
  - lib/app_rail/steps/core/list.rb
30
31
  - lib/app_rail/steps/displayable.rb
32
+ - lib/app_rail/steps/maps/map.rb
31
33
  - lib/app_rail/steps/version.rb
32
34
  homepage: https://github.com/FutureWorkshops/app_rail-steps
33
35
  licenses: