anchor_ui 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 199d5ea60336cc81222a1f39137be184067f3020da0b4a929dd3f2a5f7dd6f9e
4
+ data.tar.gz: 7beb7515ac1eae685e667760da6148723fcb72c402e1b4a325a7e7c06239b995
5
+ SHA512:
6
+ metadata.gz: 5441a89071be81ae62383a636b77417f06af0ac39122ffc36b043d004d4ac524f75403bc8b57c453a4db182318ff387c16fa8db648d8087fdbc18953cebdb64f
7
+ data.tar.gz: bb60b3efbc31a7fa213718283e884f45cb3b86060f41645ef6d6fa4b81c7b760be3568118ab0c9274e23c4f7836646381c614d7afc9d82135444022c28a5e201
Binary file
@@ -0,0 +1,8 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
@@ -0,0 +1,7 @@
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ cache: bundler
5
+ rvm:
6
+ - 2.5.3
7
+ before_install: gem install bundler -v 1.17.1
@@ -0,0 +1,74 @@
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, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ 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 TODO: Write your 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 [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in anchor_ui.gemspec
6
+ gemspec
@@ -0,0 +1,100 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ anchor_ui (0.1.0)
5
+ autoprefixer-rails (~> 6.0, >= 6.0.3)
6
+ bootstrap (~> 4.0, >= 4.0.0)
7
+ font-awesome-sass (~> 4.7, >= 4.7.0)
8
+ jquery-rails (~> 4.3, >= 4.3.1)
9
+ railties
10
+ sass (~> 3.5, >= 3.5.2)
11
+
12
+ GEM
13
+ remote: https://rubygems.org/
14
+ specs:
15
+ actionpack (5.2.1)
16
+ actionview (= 5.2.1)
17
+ activesupport (= 5.2.1)
18
+ rack (~> 2.0)
19
+ rack-test (>= 0.6.3)
20
+ rails-dom-testing (~> 2.0)
21
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
22
+ actionview (5.2.1)
23
+ activesupport (= 5.2.1)
24
+ builder (~> 3.1)
25
+ erubi (~> 1.4)
26
+ rails-dom-testing (~> 2.0)
27
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
28
+ activesupport (5.2.1)
29
+ concurrent-ruby (~> 1.0, >= 1.0.2)
30
+ i18n (>= 0.7, < 2)
31
+ minitest (~> 5.1)
32
+ tzinfo (~> 1.1)
33
+ autoprefixer-rails (6.7.7.2)
34
+ execjs
35
+ bootstrap (4.1.3)
36
+ autoprefixer-rails (>= 6.0.3)
37
+ popper_js (>= 1.12.9, < 2)
38
+ sass (>= 3.5.2)
39
+ builder (3.2.3)
40
+ concurrent-ruby (1.1.3)
41
+ crass (1.0.4)
42
+ erubi (1.7.1)
43
+ execjs (2.7.0)
44
+ ffi (1.9.25)
45
+ font-awesome-sass (4.7.0)
46
+ sass (>= 3.2)
47
+ i18n (1.1.1)
48
+ concurrent-ruby (~> 1.0)
49
+ jquery-rails (4.3.3)
50
+ rails-dom-testing (>= 1, < 3)
51
+ railties (>= 4.2.0)
52
+ thor (>= 0.14, < 2.0)
53
+ loofah (2.2.3)
54
+ crass (~> 1.0.2)
55
+ nokogiri (>= 1.5.9)
56
+ method_source (0.9.1)
57
+ mini_portile2 (2.3.0)
58
+ minitest (5.11.3)
59
+ nokogiri (1.8.5)
60
+ mini_portile2 (~> 2.3.0)
61
+ popper_js (1.14.3)
62
+ rack (2.0.6)
63
+ rack-test (1.1.0)
64
+ rack (>= 1.0, < 3)
65
+ rails-dom-testing (2.0.3)
66
+ activesupport (>= 4.2.0)
67
+ nokogiri (>= 1.6)
68
+ rails-html-sanitizer (1.0.4)
69
+ loofah (~> 2.2, >= 2.2.2)
70
+ railties (5.2.1)
71
+ actionpack (= 5.2.1)
72
+ activesupport (= 5.2.1)
73
+ method_source
74
+ rake (>= 0.8.7)
75
+ thor (>= 0.19.0, < 2.0)
76
+ rake (10.5.0)
77
+ rb-fsevent (0.10.3)
78
+ rb-inotify (0.9.10)
79
+ ffi (>= 0.5.0, < 2)
80
+ sass (3.7.2)
81
+ sass-listen (~> 4.0.0)
82
+ sass-listen (4.0.0)
83
+ rb-fsevent (~> 0.9, >= 0.9.4)
84
+ rb-inotify (~> 0.9, >= 0.9.7)
85
+ thor (0.20.0)
86
+ thread_safe (0.3.6)
87
+ tzinfo (1.2.5)
88
+ thread_safe (~> 0.1)
89
+
90
+ PLATFORMS
91
+ ruby
92
+
93
+ DEPENDENCIES
94
+ anchor_ui!
95
+ bundler (~> 1.17)
96
+ minitest (~> 5.0)
97
+ rake (~> 10.0)
98
+
99
+ BUNDLED WITH
100
+ 1.17.1
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Anchor Health, Inc.
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.
@@ -0,0 +1,62 @@
1
+ # AnchorUi
2
+
3
+ Add [CoreUI](https://coreui.io/index.html) to Rails 5 projects and the asset pipeline.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'anchor_ui'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install anchor_ui
20
+
21
+ ## Usage
22
+
23
+ Run `rails g anchor_ui:install` to import core-ui to application.scss
24
+
25
+ You can also manually add the reference:
26
+
27
+ Stylesheets:
28
+
29
+ ```ruby
30
+ // app/assets/stylesheets/application.scss
31
+
32
+ @import "custom-variables";
33
+ @import "coreui-free";
34
+ ```
35
+
36
+ Javascript:
37
+
38
+ ```ruby
39
+ // app/assets/javascripts/application.js
40
+
41
+ //= require coreui-free
42
+ ```
43
+
44
+ Run `rails g anchor_ui:layout` to generate a sample admin layout with sidebar.
45
+
46
+ ## Development
47
+
48
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
49
+
50
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
51
+
52
+ ## Contributing
53
+
54
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/anchor_ui. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
55
+
56
+ ## License
57
+
58
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
59
+
60
+ ## Code of Conduct
61
+
62
+ Everyone interacting in the AnchorUi project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/anchor_ui/blob/master/CODE_OF_CONDUCT.md).
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
+
4
+ Rake::TestTask.new(:test) do |t|
5
+ t.libs << "test"
6
+ t.libs << "lib"
7
+ t.test_files = FileList["test/**/*_test.rb"]
8
+ end
9
+
10
+ task :default => :test
@@ -0,0 +1,51 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "anchor_ui/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "anchor_ui"
8
+ spec.version = AnchorUi::VERSION
9
+ spec.authors = ["Anchor Admin"]
10
+ spec.email = ["admin@anchorhealth.com"]
11
+
12
+ spec.summary = %q{UI Kit for internal apps.}
13
+ spec.description = %q{UI Kit based on open source projects to allow rapid prototypes of internal apps.}
14
+ spec.homepage = "https://github.com/anchoradmin/anchor_ui.git"
15
+ spec.license = "MIT"
16
+
17
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
19
+ # if spec.respond_to?(:metadata)
20
+ # spec.metadata["allowed_push_host"] = "Set to 'http://mygemserver.com'"
21
+ #
22
+ # spec.metadata["homepage_uri"] = spec.homepage
23
+ # spec.metadata["source_code_uri"] = "https://github.com/anchoradmin/anchor_ui.git"
24
+ # spec.metadata["changelog_uri"] = "https://github.com/anchoradmin/anchor_ui.git"
25
+ # else
26
+ # raise "RubyGems 2.0 or newer is required to protect against " \
27
+ # "public gem pushes."
28
+ # end
29
+
30
+ # Specify which files should be added to the gem when it is released.
31
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
32
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
33
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
34
+ end
35
+ spec.bindir = "exe"
36
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
37
+ spec.require_paths = ["lib"]
38
+
39
+ spec.add_development_dependency "bundler", "~> 1.17"
40
+ spec.add_development_dependency "rake", "~> 10.0"
41
+ spec.add_development_dependency "minitest", "~> 5.0"
42
+
43
+ spec.add_dependency 'railties'
44
+
45
+ spec.add_runtime_dependency 'autoprefixer-rails', '~> 6.0', '>= 6.0.3'
46
+ spec.add_runtime_dependency 'bootstrap', '~> 4.0', '>= 4.0.0'
47
+ spec.add_runtime_dependency 'font-awesome-sass', '~> 4.7', '>= 4.7.0'
48
+ spec.add_runtime_dependency 'jquery-rails', '~> 4.3', '>= 4.3.1'
49
+ spec.add_runtime_dependency 'sass', '~> 3.5', '>= 3.5.2'
50
+ spec.add_runtime_dependency 'coreui-rails', '~> 1.1'
51
+ end
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "anchor_ui"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,6 @@
1
+ require "anchor_ui/version"
2
+
3
+ module AnchorUi
4
+ class Error < StandardError; end
5
+ # Your code goes here...
6
+ end
@@ -0,0 +1,6 @@
1
+ # module AnchorUi
2
+ # module Rails
3
+ # class Engine < ::Rails::Engine
4
+ # end
5
+ # end
6
+ # end
@@ -0,0 +1,3 @@
1
+ module AnchorUi
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,69 @@
1
+ require 'rails/generators'
2
+
3
+ module AnchorUi
4
+ class InstallGenerator < ::Rails::Generators::Base
5
+ desc 'Copy Default Anchor UI files'
6
+ source_root ::File.expand_path('../templates', __FILE__)
7
+
8
+ class_option :template_engine, default: 'erb'
9
+ class_option :stylesheet_engine, default: 'scss'
10
+ class_option :javascript_engine, default: 'js'
11
+ # class_option :layout_name, :default => 'application'
12
+ # class_option :skin, :default => 'blue', desc: 'AdminLTE skin color'
13
+ # class_option :skip_turbolinks, :type => :boolean, :default => false, :desc => "Skip Turbolinks on assets"
14
+ #
15
+ # def copy_base_scaffold_templates
16
+ # directory "lib/templates/#{options[:template_engine]}"
17
+ # end
18
+ #
19
+ # def copy_images
20
+ # directory "img/", "public/img"
21
+ # end
22
+ #
23
+ # def copy_form_builder
24
+ # copy_file "form_builder/_form.html.#{options[:template_engine]}", "lib/templates/#{options[:template_engine]}/scaffold/_form.html.#{options[:template_engine]}"
25
+ # end
26
+ #
27
+ # def copy_nav_helper
28
+ # copy_file "helpers/navigation_helper.rb", "app/helpers/nav_helper.rb"
29
+ # end
30
+ #
31
+ # def create_layout
32
+ # template "layouts/dashboard.html.#{options[:template_engine]}", "app/views/layouts/#{options[:layout_name]}.html.#{options[:template_engine]}"
33
+ # template "layouts/_header.html.#{options[:template_engine]}", "app/views/layouts/_#{options[:layout_name]}_header.html.#{options[:template_engine]}"
34
+ # template "layouts/_sidebar.html.#{options[:template_engine]}", "app/views/layouts/_#{options[:layout_name]}_sidebar.html.#{options[:template_engine]}"
35
+ # end
36
+ #
37
+ def create_stylesheets
38
+ copy_file "install/_custom-variables.#{options[:stylesheet_engine]}", "app/assets/stylesheets/_custom-variables.#{options[:stylesheet_engine]}"
39
+ end
40
+
41
+ def inject_stylesheets
42
+ application_scss_path = "app/assets/stylesheets/application.scss"
43
+
44
+ if ::File.exists?(::File.join(destination_root, application_scss_path))
45
+ inject_into_file application_scss_path, before: 'end' do
46
+ "@import 'custom-variables';\n"+
47
+ "@import 'coreui-free';\n"
48
+ end
49
+ end
50
+ end
51
+
52
+ def create_javascript
53
+ copy_file "install/core-ui.#{options[:javascript_engine]}", "app/assets/stylesheets/core-ui.#{options[:javascript_engine]}"
54
+ end
55
+
56
+ def inject_javascript
57
+
58
+ application_js_path = "app/assets/javascripts/application.js"
59
+
60
+ if ::File.exists?(::File.join(destination_root, application_js_path))
61
+ inject_into_file application_js_path, before: '//= require_tree' do
62
+ # "//= require bootstrap\n"+
63
+ # "//= require jquery-rails\n"
64
+ "//= require coreui-free\n"
65
+ end
66
+ end
67
+ end
68
+ end
69
+ end