workarea-styled_selects 1.1.1

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.
Files changed (79) hide show
  1. checksums.yaml +7 -0
  2. data/.editorconfig +16 -0
  3. data/.eslintrc +25 -0
  4. data/.gitignore +19 -0
  5. data/.rails-rubocop.yml +119 -0
  6. data/.rubocop.yml +8 -0
  7. data/.scss-lint.yml +192 -0
  8. data/CHANGELOG.md +33 -0
  9. data/Gemfile +19 -0
  10. data/README.md +66 -0
  11. data/Rakefile +61 -0
  12. data/app/assets/stylesheets/workarea/styled_selects/components/_styled_select.scss +58 -0
  13. data/app/helpers/.keep +0 -0
  14. data/app/helpers/workarea/storefront/styled_select_helper.rb +11 -0
  15. data/app/views/workarea/storefront/style_guides/components/_styled_select.html.haml +13 -0
  16. data/bin/rails +20 -0
  17. data/config/initializers/appends.rb +6 -0
  18. data/config/initializers/workarea.rb +3 -0
  19. data/config/routes.rb +2 -0
  20. data/lib/tasks/styled_selects_tasks.rake +4 -0
  21. data/lib/workarea/styled_selects/engine.rb +12 -0
  22. data/lib/workarea/styled_selects/version.rb +5 -0
  23. data/lib/workarea/styled_selects.rb +11 -0
  24. data/script/admin_ci +9 -0
  25. data/script/ci +11 -0
  26. data/script/core_ci +9 -0
  27. data/script/plugins_ci +9 -0
  28. data/script/storefront_ci +9 -0
  29. data/test/dummy/Rakefile +6 -0
  30. data/test/dummy/app/assets/config/manifest.js +4 -0
  31. data/test/dummy/app/assets/images/.keep +0 -0
  32. data/test/dummy/app/assets/javascripts/application.js +13 -0
  33. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  34. data/test/dummy/app/controllers/application_controller.rb +3 -0
  35. data/test/dummy/app/controllers/concerns/.keep +0 -0
  36. data/test/dummy/app/helpers/application_helper.rb +2 -0
  37. data/test/dummy/app/jobs/application_job.rb +2 -0
  38. data/test/dummy/app/mailers/application_mailer.rb +4 -0
  39. data/test/dummy/app/models/concerns/.keep +0 -0
  40. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  41. data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
  42. data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
  43. data/test/dummy/bin/bundle +3 -0
  44. data/test/dummy/bin/rails +4 -0
  45. data/test/dummy/bin/rake +4 -0
  46. data/test/dummy/bin/setup +38 -0
  47. data/test/dummy/bin/update +29 -0
  48. data/test/dummy/bin/yarn +11 -0
  49. data/test/dummy/config/application.rb +29 -0
  50. data/test/dummy/config/boot.rb +5 -0
  51. data/test/dummy/config/cable.yml +10 -0
  52. data/test/dummy/config/environment.rb +5 -0
  53. data/test/dummy/config/environments/development.rb +54 -0
  54. data/test/dummy/config/environments/production.rb +91 -0
  55. data/test/dummy/config/environments/test.rb +44 -0
  56. data/test/dummy/config/initializers/application_controller_renderer.rb +8 -0
  57. data/test/dummy/config/initializers/assets.rb +14 -0
  58. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  59. data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
  60. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  61. data/test/dummy/config/initializers/inflections.rb +16 -0
  62. data/test/dummy/config/initializers/mime_types.rb +4 -0
  63. data/test/dummy/config/initializers/workarea.rb +5 -0
  64. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  65. data/test/dummy/config/locales/en.yml +33 -0
  66. data/test/dummy/config/puma.rb +56 -0
  67. data/test/dummy/config/routes.rb +5 -0
  68. data/test/dummy/config/secrets.yml +32 -0
  69. data/test/dummy/config/spring.rb +6 -0
  70. data/test/dummy/config.ru +5 -0
  71. data/test/dummy/db/seeds.rb +2 -0
  72. data/test/dummy/lib/assets/.keep +0 -0
  73. data/test/dummy/log/.keep +0 -0
  74. data/test/dummy/package.json +5 -0
  75. data/test/system/workarea/storefront/styled_selects_system_test.rb +40 -0
  76. data/test/teaspoon_env.rb +6 -0
  77. data/test/test_helper.rb +10 -0
  78. data/workarea-styled_selects.gemspec +19 -0
  79. metadata +134 -0
@@ -0,0 +1,33 @@
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # The following keys must be escaped otherwise they will not be retrieved by
20
+ # the default I18n backend:
21
+ #
22
+ # true, false, on, off, yes, no
23
+ #
24
+ # Instead, surround them with single quotes.
25
+ #
26
+ # en:
27
+ # 'true': 'foo'
28
+ #
29
+ # To learn more, please read the Rails Internationalization guide
30
+ # available at http://guides.rubyonrails.org/i18n.html.
31
+
32
+ en:
33
+ hello: "Hello world"
@@ -0,0 +1,56 @@
1
+ # Puma can serve each request in a thread from an internal thread pool.
2
+ # The `threads` method setting takes two numbers: a minimum and maximum.
3
+ # Any libraries that use thread pools should be configured to match
4
+ # the maximum value specified for Puma. Default is set to 5 threads for minimum
5
+ # and maximum; this matches the default thread size of Active Record.
6
+ #
7
+ threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
8
+ threads threads_count, threads_count
9
+
10
+ # Specifies the `port` that Puma will listen on to receive requests; default is 3000.
11
+ #
12
+ port ENV.fetch("PORT") { 3000 }
13
+
14
+ # Specifies the `environment` that Puma will run in.
15
+ #
16
+ environment ENV.fetch("RAILS_ENV") { "development" }
17
+
18
+ # Specifies the number of `workers` to boot in clustered mode.
19
+ # Workers are forked webserver processes. If using threads and workers together
20
+ # the concurrency of the application would be max `threads` * `workers`.
21
+ # Workers do not work on JRuby or Windows (both of which do not support
22
+ # processes).
23
+ #
24
+ # workers ENV.fetch("WEB_CONCURRENCY") { 2 }
25
+
26
+ # Use the `preload_app!` method when specifying a `workers` number.
27
+ # This directive tells Puma to first boot the application and load code
28
+ # before forking the application. This takes advantage of Copy On Write
29
+ # process behavior so workers use less memory. If you use this option
30
+ # you need to make sure to reconnect any threads in the `on_worker_boot`
31
+ # block.
32
+ #
33
+ # preload_app!
34
+
35
+ # If you are preloading your application and using Active Record, it's
36
+ # recommended that you close any connections to the database before workers
37
+ # are forked to prevent connection leakage.
38
+ #
39
+ # before_fork do
40
+ # ActiveRecord::Base.connection_pool.disconnect! if defined?(ActiveRecord)
41
+ # end
42
+
43
+ # The code in the `on_worker_boot` will be called if you are using
44
+ # clustered mode by specifying a number of `workers`. After each worker
45
+ # process is booted, this block will be run. If you are using the `preload_app!`
46
+ # option, you will want to use this block to reconnect to any threads
47
+ # or connections that may have been created at application boot, as Ruby
48
+ # cannot share connections between processes.
49
+ #
50
+ # on_worker_boot do
51
+ # ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
52
+ # end
53
+ #
54
+
55
+ # Allow puma to be restarted by `rails restart` command.
56
+ plugin :tmp_restart
@@ -0,0 +1,5 @@
1
+ Rails.application.routes.draw do
2
+ mount Workarea::Core::Engine => '/'
3
+ mount Workarea::Admin::Engine => '/admin', as: 'admin'
4
+ mount Workarea::Storefront::Engine => '/', as: 'storefront'
5
+ end
@@ -0,0 +1,32 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ # You can use `rails secret` to generate a secure secret key.
9
+
10
+ # Make sure the secrets in this file are kept private
11
+ # if you're sharing your code publicly.
12
+
13
+ # Shared secrets are available across all environments.
14
+
15
+ # shared:
16
+ # api_key: a1B2c3D4e5F6
17
+
18
+ # Environmental secrets are only available for that specific environment.
19
+
20
+ development:
21
+ secret_key_base: d3ed5c72b185eb33c1edd847f3a3ec0fced053988b924a553960cd00c638e70b30d0694c8cc8034449ab7473783df77872482658aafa20801d7ab6f8666cc4fa
22
+
23
+ test:
24
+ secret_key_base: 9239e4034048c6cb133af20f037e220d7bb8a354b0e584a81f00cf2969834818c8aa0729e888c8f8a9faa28478546793625959fc1cece3bbfe695aec2b1f7ff0
25
+
26
+ # Do not keep production secrets in the unencrypted secrets file.
27
+ # Instead, either read values from the environment.
28
+ # Or, use `bin/rails secrets:setup` to configure encrypted secrets
29
+ # and move the `production:` environment over there.
30
+
31
+ production:
32
+ secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
@@ -0,0 +1,6 @@
1
+ %w(
2
+ .ruby-version
3
+ .rbenv-vars
4
+ tmp/restart.txt
5
+ tmp/caching-dev.txt
6
+ ).each { |path| Spring.watch(path) }
@@ -0,0 +1,5 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require_relative 'config/environment'
4
+
5
+ run Rails.application
@@ -0,0 +1,2 @@
1
+ require 'workarea/seeds'
2
+ Workarea::Seeds.run
File without changes
File without changes
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "dummy",
3
+ "private": true,
4
+ "dependencies": {}
5
+ }
@@ -0,0 +1,40 @@
1
+ require "test_helper"
2
+
3
+ module Workarea
4
+ module Storefront
5
+ class StyledSelectsSystemTest < Workarea::SystemTest
6
+ def test_styled_select
7
+ visit storefront.style_guides_path
8
+
9
+ Capybara.match = :first
10
+
11
+ within "#components" do
12
+ click_on "styled-select"
13
+ end
14
+
15
+ assert_selector ".styled-select"
16
+
17
+ within ".styled-select" do
18
+ assert_selector "select"
19
+ end
20
+ end
21
+
22
+ def test_styled_select_with_class_modifier
23
+ visit storefront.style_guides_path
24
+
25
+ Capybara.match = :first
26
+
27
+ within "#components" do
28
+ click_on "styled-select"
29
+ end
30
+
31
+ assert_selector ".styled-select--modified"
32
+
33
+ within ".styled-select--modified" do
34
+ assert_selector "select"
35
+ refute_selector ".styled-select--modified"
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,6 @@
1
+ require "workarea/testing/teaspoon"
2
+
3
+ Teaspoon.configure do |config|
4
+ config.root = Workarea::StyledSelects::Engine.root
5
+ Workarea::Teaspoon.apply(config)
6
+ end
@@ -0,0 +1,10 @@
1
+ # Configure Rails Environment
2
+ ENV["RAILS_ENV"] = "test"
3
+
4
+ require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
5
+ require "rails/test_help"
6
+ require "workarea/test_help"
7
+
8
+ # Filter out Minitest backtrace while allowing backtrace from other libraries
9
+ # to be shown.
10
+ Minitest.backtrace_filter = Minitest::BacktraceFilter.new
@@ -0,0 +1,19 @@
1
+ $:.push File.expand_path("../lib", __FILE__)
2
+
3
+ # Maintain your gem's version:
4
+ require "workarea/styled_selects/version"
5
+
6
+ # Describe your gem and declare its dependencies:
7
+ Gem::Specification.new do |s|
8
+ s.name = "workarea-styled_selects"
9
+ s.version = Workarea::StyledSelects::VERSION
10
+ s.authors = ["Jake Beresford"]
11
+ s.email = ["jberesford@weblinc.com"]
12
+ s.homepage = "https://stash.tools.weblinc.com/projects/WP/repos/workarea-styled-selects/browse"
13
+ s.summary = "Styled select input UI for the Workarea platform"
14
+ s.description = "Easily customize the styling of the <select> input type in a workarea application"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+
18
+ s.add_dependency "workarea", "~> 3.x"
19
+ end
metadata ADDED
@@ -0,0 +1,134 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: workarea-styled_selects
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Jake Beresford
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-08-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: workarea
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 3.x
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 3.x
27
+ description: Easily customize the styling of the <select> input type in a workarea
28
+ application
29
+ email:
30
+ - jberesford@weblinc.com
31
+ executables: []
32
+ extensions: []
33
+ extra_rdoc_files: []
34
+ files:
35
+ - ".editorconfig"
36
+ - ".eslintrc"
37
+ - ".gitignore"
38
+ - ".rails-rubocop.yml"
39
+ - ".rubocop.yml"
40
+ - ".scss-lint.yml"
41
+ - CHANGELOG.md
42
+ - Gemfile
43
+ - README.md
44
+ - Rakefile
45
+ - app/assets/stylesheets/workarea/styled_selects/components/_styled_select.scss
46
+ - app/helpers/.keep
47
+ - app/helpers/workarea/storefront/styled_select_helper.rb
48
+ - app/views/workarea/storefront/style_guides/components/_styled_select.html.haml
49
+ - bin/rails
50
+ - config/initializers/appends.rb
51
+ - config/initializers/workarea.rb
52
+ - config/routes.rb
53
+ - lib/tasks/styled_selects_tasks.rake
54
+ - lib/workarea/styled_selects.rb
55
+ - lib/workarea/styled_selects/engine.rb
56
+ - lib/workarea/styled_selects/version.rb
57
+ - script/admin_ci
58
+ - script/ci
59
+ - script/core_ci
60
+ - script/plugins_ci
61
+ - script/storefront_ci
62
+ - test/dummy/Rakefile
63
+ - test/dummy/app/assets/config/manifest.js
64
+ - test/dummy/app/assets/images/.keep
65
+ - test/dummy/app/assets/javascripts/application.js
66
+ - test/dummy/app/assets/stylesheets/application.css
67
+ - test/dummy/app/controllers/application_controller.rb
68
+ - test/dummy/app/controllers/concerns/.keep
69
+ - test/dummy/app/helpers/application_helper.rb
70
+ - test/dummy/app/jobs/application_job.rb
71
+ - test/dummy/app/mailers/application_mailer.rb
72
+ - test/dummy/app/models/concerns/.keep
73
+ - test/dummy/app/views/layouts/application.html.erb
74
+ - test/dummy/app/views/layouts/mailer.html.erb
75
+ - test/dummy/app/views/layouts/mailer.text.erb
76
+ - test/dummy/bin/bundle
77
+ - test/dummy/bin/rails
78
+ - test/dummy/bin/rake
79
+ - test/dummy/bin/setup
80
+ - test/dummy/bin/update
81
+ - test/dummy/bin/yarn
82
+ - test/dummy/config.ru
83
+ - test/dummy/config/application.rb
84
+ - test/dummy/config/boot.rb
85
+ - test/dummy/config/cable.yml
86
+ - test/dummy/config/environment.rb
87
+ - test/dummy/config/environments/development.rb
88
+ - test/dummy/config/environments/production.rb
89
+ - test/dummy/config/environments/test.rb
90
+ - test/dummy/config/initializers/application_controller_renderer.rb
91
+ - test/dummy/config/initializers/assets.rb
92
+ - test/dummy/config/initializers/backtrace_silencers.rb
93
+ - test/dummy/config/initializers/cookies_serializer.rb
94
+ - test/dummy/config/initializers/filter_parameter_logging.rb
95
+ - test/dummy/config/initializers/inflections.rb
96
+ - test/dummy/config/initializers/mime_types.rb
97
+ - test/dummy/config/initializers/workarea.rb
98
+ - test/dummy/config/initializers/wrap_parameters.rb
99
+ - test/dummy/config/locales/en.yml
100
+ - test/dummy/config/puma.rb
101
+ - test/dummy/config/routes.rb
102
+ - test/dummy/config/secrets.yml
103
+ - test/dummy/config/spring.rb
104
+ - test/dummy/db/seeds.rb
105
+ - test/dummy/lib/assets/.keep
106
+ - test/dummy/log/.keep
107
+ - test/dummy/package.json
108
+ - test/system/workarea/storefront/styled_selects_system_test.rb
109
+ - test/teaspoon_env.rb
110
+ - test/test_helper.rb
111
+ - workarea-styled_selects.gemspec
112
+ homepage: https://stash.tools.weblinc.com/projects/WP/repos/workarea-styled-selects/browse
113
+ licenses: []
114
+ metadata: {}
115
+ post_install_message:
116
+ rdoc_options: []
117
+ require_paths:
118
+ - lib
119
+ required_ruby_version: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
124
+ required_rubygems_version: !ruby/object:Gem::Requirement
125
+ requirements:
126
+ - - ">="
127
+ - !ruby/object:Gem::Version
128
+ version: '0'
129
+ requirements: []
130
+ rubygems_version: 3.0.4
131
+ signing_key:
132
+ specification_version: 4
133
+ summary: Styled select input UI for the Workarea platform
134
+ test_files: []