voom-presenters 0.1.12 → 0.1.13

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eac25e4fe021eaed13ad89d1d15a513b7ed3d22fe7eb4a9cdedc15c4878d7a43
4
- data.tar.gz: 93b10d4ea9b84f8c944a730d810a4d63c338e59d859aa8cd4473dacbd5975651
3
+ metadata.gz: ea47b365bb4c88502136458e8ed1965b4db8c48183f89c3dc314c135887b0a6b
4
+ data.tar.gz: ac0d581d5761b8b344054e6b6c4208f4a18e0570eba9ac0748daa8a5c0bcc187
5
5
  SHA512:
6
- metadata.gz: d3297d3b8b8e5aa1b5fc8cf87b2774578d21e1502171e395731a3df436834d1b5c815c60cda46f7f5816f4685860adf2045a108e8516016cd33b896d46c0ff86
7
- data.tar.gz: c9f976a58279589ef6924ab42b2eee3969de179ed956018f039853c0f9f3dff97dd7c93d783a6e18e7cf89c43b5b6a4f65bf2010a65d570606afb11b259f7539
6
+ metadata.gz: 953548a19ff7393c4bc0dca476f4dadc9b7bca08fe803c5578557554c04967f48331e57bba55c0aeb3d7e5c2cc79084a7802008e7971f61663924446b8999203
7
+ data.tar.gz: e07ff9cf18c41922b022b07a66f44d2d7bf2a71bc5ac1dcba35056c5205681a7f5e417c7b3e30f867694b6fcfa45b4fed1e40d5cb37c59744137b392d264f81e
data/.gem_release.yml ADDED
@@ -0,0 +1 @@
1
+ file: lib/voom/presenters/version.rb
data/.gitignore CHANGED
@@ -51,4 +51,5 @@ build-iPhoneSimulator/
51
51
 
52
52
  /.idea/
53
53
  .DS_Store
54
- .env
54
+ .env
55
+ notes.txt
@@ -0,0 +1,73 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, sex characteristics, gender identity and expression,
9
+ level of experience, education, socio-economic status, nationality, personal
10
+ appearance, race, religion, or sexual identity and orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72
+
73
+ [homepage]: https://www.contributor-covenant.org
data/Gemfile.lock CHANGED
@@ -68,6 +68,8 @@ GEM
68
68
  selenium-webdriver (3.11.0)
69
69
  childprocess (~> 0.5)
70
70
  rubyzip (~> 1.2)
71
+ shotgun (0.9.2)
72
+ rack (>= 1.0)
71
73
  simplecov (0.15.1)
72
74
  docile (~> 1.1.0)
73
75
  json (>= 1.8, < 3)
@@ -107,6 +109,7 @@ DEPENDENCIES
107
109
  rspec
108
110
  rspec-html-matchers
109
111
  rspec_junit_formatter
112
+ shotgun (~> 0.9)
110
113
  simplecov
111
114
  voom-presenters!
112
115
  watir (~> 6.10.3)
@@ -62,7 +62,7 @@ Voom::Presenters.define(:lists) do
62
62
  line do
63
63
  text actor.name
64
64
  avatar :person
65
- action do
65
+ actions do
66
66
  icon :star
67
67
  end
68
68
  end
@@ -75,7 +75,7 @@ Voom::Presenters.define(:lists) do
75
75
  line do
76
76
  text actor.name
77
77
  avatar :person
78
- action do
78
+ actions do
79
79
  case index%4
80
80
  when 0
81
81
  checkbox
@@ -99,24 +99,13 @@ Voom::Presenters.define(:lists) do
99
99
  text actor.name
100
100
  avatar :person
101
101
  info 'actor' if index == 0
102
- action do
102
+ actions do
103
103
  icon_toggle :star
104
104
  end
105
105
  subtitle "#{actor.episodes} episodes"
106
106
  end
107
107
  end
108
108
  end
109
- #
110
- # headline 'Three line'
111
- #
112
- # list do
113
- # actors.each do |actor|
114
- # line actor.name, avatar: :person do
115
- # action icon: :star
116
- # body actor.body
117
- # end
118
- # end
119
- # end
120
109
 
121
110
  headline 'Selectable List'
122
111
  list selectable: true do
@@ -0,0 +1,63 @@
1
+ require_relative 'action'
2
+
3
+ module Voom
4
+ module Presenters
5
+ module DSL
6
+ module Components
7
+ module Lists
8
+ class Actions < Base
9
+ def initialize(actions, **attribs_, &block)
10
+ @actions = actions
11
+ super(type: :actions, **attribs_, &block)
12
+ expand!
13
+ end
14
+
15
+
16
+ def icon(icon=nil, **attribs, &block)
17
+ action = Lists::Action.new(parent: self, context: context)
18
+ action.icon(icon, **attribs, &block)
19
+ @actions << action
20
+ end
21
+
22
+
23
+ def menu(**attribs, &block)
24
+ action = Lists::Action.new(parent: self, context: context)
25
+ action.menu(**attribs, &block)
26
+ @actions << action
27
+ end
28
+
29
+ def checkbox(**attribs, &block)
30
+ action = Lists::Action.new(parent: self, context: context)
31
+ action.checkbox(**attribs, &block)
32
+ @actions << action
33
+ end
34
+
35
+ def radio_button(**attribs, &block)
36
+ action = Lists::Action.new(parent: self, context: context)
37
+ action.radio_button(**attribs, &block)
38
+ @actions << action
39
+ end
40
+
41
+ def switch(**attribs, &block)
42
+ action = Lists::Action.new(parent: self, context: context)
43
+ action.switch(**attribs, &block)
44
+ @actions << action
45
+ end
46
+
47
+ def icon_toggle(icon=nil, **attribs, &block)
48
+ action = Lists::Action.new(parent: self, context: context)
49
+ action.icon_toggle(icon, **attribs, &block)
50
+ @actions << action
51
+ end
52
+
53
+ def button(text=nil, **attribs, &block)
54
+ action = Lists::Action.new(parent: self, context: context)
55
+ action.button(text, **attribs, &block)
56
+ @actions << action
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end
63
+ end
@@ -1,4 +1,4 @@
1
- require_relative 'action'
1
+ require_relative 'actions'
2
2
  require_relative '../icon'
3
3
  require_relative '../avatar'
4
4
  require_relative '../typography'
@@ -10,12 +10,14 @@ module Voom
10
10
  module Components
11
11
  module Lists
12
12
  class Line < EventBase
13
+ extend Gem::Deprecate
14
+
13
15
  attr_accessor :selected, :selectable
14
16
 
15
17
  def initialize(**attribs_, &block)
16
18
  super(type: :line, **attribs_, &block)
17
- @selected = attribs.delete(:selected) { false }
18
- @selectable = attribs.delete(:selectable) { false }
19
+ @selected = attribs.delete(:selected) {false}
20
+ @selectable = attribs.delete(:selectable) {false}
19
21
  self.text(attribs.delete(:text)) if attribs.key?(:text)
20
22
  self.subtitle(attribs.delete(:subtitle)) if attribs.key?(:subtitle)
21
23
  self.info(attribs.delete(:info)) if attribs.key?(:info)
@@ -80,15 +82,15 @@ module Voom
80
82
 
81
83
  def actions(**attribs, &block)
82
84
  return @actions if locked?
83
- @actions << Lists::Action.new(parent: self,
84
- context: context,
85
- **attribs, &block)
85
+ Actions.new(@actions, parent: self,
86
+ context: context,
87
+ **attribs, &block)
86
88
  end
87
89
  alias action actions
88
-
90
+ deprecate :action, :actions, 2018, 8
89
91
  end
90
92
  end
91
93
  end
92
94
  end
93
95
  end
94
- end
96
+ end
@@ -1,5 +1,5 @@
1
1
  module Voom
2
2
  module Presenters
3
- VERSION = '0.1.12'.freeze
3
+ VERSION = '0.1.13'.freeze
4
4
  end
5
5
  end
data/presenters.gemspec CHANGED
@@ -35,5 +35,5 @@ Gem::Specification.new do |spec|
35
35
  spec.add_development_dependency 'rake', '~> 11.3'
36
36
  spec.add_development_dependency 'rspec', '~> 3.0'
37
37
  spec.add_development_dependency 'gem-release', '~> 2.0'
38
-
38
+ spec.add_development_dependency 'shotgun', '~> 0.9'
39
39
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: voom-presenters
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Russell Edens
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-27 00:00:00.000000000 Z
11
+ date: 2018-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ice_nine
@@ -218,6 +218,20 @@ dependencies:
218
218
  - - "~>"
219
219
  - !ruby/object:Gem::Version
220
220
  version: '2.0'
221
+ - !ruby/object:Gem::Dependency
222
+ name: shotgun
223
+ requirement: !ruby/object:Gem::Requirement
224
+ requirements:
225
+ - - "~>"
226
+ - !ruby/object:Gem::Version
227
+ version: '0.9'
228
+ type: :development
229
+ prerelease: false
230
+ version_requirements: !ruby/object:Gem::Requirement
231
+ requirements:
232
+ - - "~>"
233
+ - !ruby/object:Gem::Version
234
+ version: '0.9'
221
235
  description:
222
236
  email:
223
237
  - 'russell@voomify.com
@@ -228,8 +242,10 @@ extensions: []
228
242
  extra_rdoc_files: []
229
243
  files:
230
244
  - ".circleci/config.yml"
245
+ - ".gem_release.yml"
231
246
  - ".gitignore"
232
247
  - ".ruby-version"
248
+ - CODE-OF-CONDUCT.md
233
249
  - Gemfile
234
250
  - Gemfile.lock
235
251
  - LICENSE
@@ -340,6 +356,7 @@ files:
340
356
  - lib/voom/presenters/dsl/components/input.rb
341
357
  - lib/voom/presenters/dsl/components/list.rb
342
358
  - lib/voom/presenters/dsl/components/lists/action.rb
359
+ - lib/voom/presenters/dsl/components/lists/actions.rb
343
360
  - lib/voom/presenters/dsl/components/lists/header.rb
344
361
  - lib/voom/presenters/dsl/components/lists/line.rb
345
362
  - lib/voom/presenters/dsl/components/lists/separator.rb