archangel 0.0.8 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.jshintrc +1 -1
- data/.reek.yml +42 -0
- data/.rubocop.yml +1 -12
- data/.rubocop_exclude.yml +12 -0
- data/.rubocop_todo.yml +0 -4
- data/.travis.yml +5 -7
- data/Gemfile +12 -14
- data/MIT-LICENSE +1 -1
- data/README.md +1 -1
- data/app/controllers/archangel/application_controller.rb +0 -2
- data/app/controllers/archangel/auth/registrations_controller.rb +12 -0
- data/app/controllers/archangel/backend/assets_controller.rb +10 -259
- data/app/controllers/archangel/backend/collections_controller.rb +5 -214
- data/app/controllers/archangel/backend/entries_controller.rb +25 -239
- data/app/controllers/archangel/backend/pages_controller.rb +11 -261
- data/app/controllers/archangel/backend/profiles_controller.rb +19 -12
- data/app/controllers/archangel/backend/sites_controller.rb +17 -16
- data/app/controllers/archangel/backend/templates_controller.rb +5 -232
- data/app/controllers/archangel/backend/users_controller.rb +10 -260
- data/app/controllers/archangel/backend/widgets_controller.rb +5 -226
- data/app/controllers/archangel/frontend/pages_controller.rb +6 -7
- data/app/controllers/concerns/archangel/actionable_concern.rb +9 -0
- data/app/controllers/concerns/archangel/controllers/backend/resourceful_concern.rb +28 -0
- data/app/controllers/concerns/archangel/controllers/resourceful_concern.rb +258 -0
- data/app/controllers/concerns/archangel/paginatable_concern.rb +2 -0
- data/app/controllers/concerns/archangel/seoable_concern.rb +9 -8
- data/app/models/archangel/metatag.rb +12 -0
- data/app/models/archangel/page.rb +7 -1
- data/app/models/archangel/site.rb +6 -1
- data/app/models/archangel/user.rb +7 -0
- data/app/views/archangel/backend/pages/_form.html.erb +12 -2
- data/app/views/archangel/backend/pages/_metatag_fields.html.erb +6 -0
- data/app/views/archangel/backend/pages/show.html.erb +0 -10
- data/app/views/archangel/backend/profiles/_form.html.erb +2 -0
- data/app/views/archangel/backend/sites/_form.html.erb +11 -2
- data/app/views/archangel/backend/sites/_metatag_fields.html.erb +6 -0
- data/app/views/archangel/backend/sites/show.html.erb +0 -10
- data/app/views/archangel/frontend/pages/show.json.jbuilder +1 -2
- data/archangel.gemspec +18 -11
- data/bin/archangel +6 -4
- data/config/locales/active_record.en.yml +3 -4
- data/config/locales/en.yml +6 -0
- data/db/migrate/20190101220919_add_preferences_to_archangel_users.rb +5 -0
- data/db/migrate/20190113130750_create_archangel_metatags.rb +14 -0
- data/db/migrate/20190113130751_remove_meta_keywords_and_meta_description_from_archangel_pages.rb +6 -0
- data/db/migrate/20190113130752_remove_meta_keywords_and_meta_description_from_archangel_sites.rb +6 -0
- data/docs/Developers.md +2 -2
- data/docs/Extension/Developers.md +1 -1
- data/docs/Extension/Uploaders.md +53 -1
- data/docs/Theme/Developers.md +8 -2
- data/lib/archangel.rb +2 -2
- data/lib/archangel/commands/base_command.rb +35 -0
- data/lib/archangel/commands/extension_command.rb +128 -0
- data/lib/archangel/{command/templates/extension → commands/templates/common}/.editorconfig +0 -0
- data/lib/archangel/{command/templates/extension → commands/templates/common}/.gitignore +0 -0
- data/lib/archangel/{command/templates/extension → commands/templates/common}/.rspec +0 -0
- data/lib/archangel/{command/templates/extension → commands/templates/common}/.rubocop.yml +0 -0
- data/lib/archangel/{command/templates/extension → commands/templates/common}/MIT-LICENSE +0 -0
- data/lib/archangel/{command/templates/extension → commands/templates/common}/spec/rails_helper.rb.tt +0 -3
- data/lib/archangel/{command/templates/extension → commands/templates/common}/spec/spec_helper.rb +0 -0
- data/lib/archangel/{command/templates/extension → commands/templates/common}/spec/support/.keep +0 -0
- data/lib/archangel/{command → commands}/templates/extension/Gemfile +9 -10
- data/lib/archangel/{command → commands}/templates/extension/README.md +0 -0
- data/lib/archangel/{command → commands}/templates/extension/Rakefile +0 -0
- data/lib/archangel/{command → commands}/templates/extension/app/assets/javascripts/archangel/auth/%extension_name%.js.tt +0 -0
- data/lib/archangel/{command → commands}/templates/extension/app/assets/javascripts/archangel/backend/%extension_name%.js.tt +0 -0
- data/lib/archangel/{command → commands}/templates/extension/app/assets/javascripts/archangel/frontend/%extension_name%.js.tt +0 -0
- data/lib/archangel/{command → commands}/templates/extension/app/assets/stylesheets/archangel/auth/%extension_name%.css.tt +0 -0
- data/lib/archangel/{command → commands}/templates/extension/app/assets/stylesheets/archangel/backend/%extension_name%.css.tt +0 -0
- data/lib/archangel/{command → commands}/templates/extension/app/assets/stylesheets/archangel/frontend/%extension_name%.css.tt +0 -0
- data/lib/archangel/{command → commands}/templates/extension/bin/rails.tt +0 -0
- data/lib/archangel/{command → commands}/templates/extension/config/locales/en.yml.tt +0 -0
- data/lib/archangel/{command → commands}/templates/extension/config/routes.rb +0 -0
- data/lib/archangel/{command/templates/extension/extension.gemspec → commands/templates/extension/extension.gemspec.tt} +0 -0
- data/lib/archangel/{command → commands}/templates/extension/lib/%extension_name%.rb.tt +0 -0
- data/lib/archangel/{command → commands}/templates/extension/lib/%extension_name%/engine.rb.tt +0 -0
- data/lib/archangel/{command → commands}/templates/extension/lib/%extension_name%/factories.rb.tt +0 -0
- data/lib/archangel/{command → commands}/templates/extension/lib/%extension_name%/version.rb.tt +0 -0
- data/lib/archangel/{command → commands}/templates/extension/lib/generators/%extension_name%/install/install_generator.rb.tt +0 -0
- data/lib/archangel/commands/templates/theme/Gemfile +27 -0
- data/lib/archangel/commands/templates/theme/README.md +44 -0
- data/lib/archangel/commands/templates/theme/Rakefile +29 -0
- data/lib/archangel/commands/templates/theme/app/themes/%theme_base_name%/assets/javascripts/%theme_base_name%/auth.js +2 -0
- data/lib/archangel/commands/templates/theme/app/themes/%theme_base_name%/assets/javascripts/%theme_base_name%/backend.js +2 -0
- data/lib/archangel/commands/templates/theme/app/themes/%theme_base_name%/assets/javascripts/%theme_base_name%/frontend.js +2 -0
- data/lib/archangel/commands/templates/theme/app/themes/%theme_base_name%/assets/stylesheets/%theme_base_name%/auth.css +4 -0
- data/lib/archangel/commands/templates/theme/app/themes/%theme_base_name%/assets/stylesheets/%theme_base_name%/backend.css +4 -0
- data/lib/archangel/commands/templates/theme/app/themes/%theme_base_name%/assets/stylesheets/%theme_base_name%/frontend.css +4 -0
- data/lib/archangel/commands/templates/theme/app/themes/%theme_base_name%/config/locales/en.yml.tt +4 -0
- data/lib/archangel/commands/templates/theme/app/themes/%theme_base_name%/views/layouts/frontend.liquid +18 -0
- data/lib/archangel/commands/templates/theme/bin/rails.tt +11 -0
- data/lib/archangel/commands/templates/theme/lib/%theme_name%.rb.tt +9 -0
- data/lib/archangel/commands/templates/theme/lib/%theme_name%/engine.rb.tt +29 -0
- data/lib/archangel/commands/templates/theme/lib/%theme_name%/version.rb.tt +5 -0
- data/lib/archangel/commands/templates/theme/theme.gemspec.tt +25 -0
- data/lib/archangel/commands/theme_command.rb +129 -0
- data/lib/archangel/config.rb +11 -2
- data/lib/archangel/liquid/drop.rb +26 -0
- data/lib/archangel/liquid/drops/page_drop.rb +1 -1
- data/lib/archangel/liquid/drops/site_drop.rb +1 -1
- data/lib/archangel/liquid/filters/link_to_filter.rb +1 -0
- data/lib/archangel/liquid/tags/application_tag.rb +18 -5
- data/lib/archangel/liquid/tags/collection_tag.rb +1 -1
- data/lib/archangel/liquid/tags/csrf_meta_tags_tag.rb +1 -0
- data/lib/archangel/liquid/tags/locale_tag.rb +1 -0
- data/lib/archangel/liquid/tags/meta_tags_tag.rb +1 -0
- data/lib/archangel/liquid/tags/noembed_tag.rb +140 -0
- data/lib/archangel/liquid/tags/text_direction_tag.rb +1 -0
- data/lib/archangel/liquid/tags/theme_javascript_tag.rb +1 -0
- data/lib/archangel/liquid/tags/theme_stylesheet_tag.rb +1 -0
- data/lib/archangel/testing_support/factories/archangel_assets.rb +2 -2
- data/lib/archangel/testing_support/factories/archangel_collections.rb +1 -1
- data/lib/archangel/testing_support/factories/archangel_entries.rb +1 -1
- data/lib/archangel/testing_support/factories/archangel_fields.rb +4 -4
- data/lib/archangel/testing_support/factories/archangel_metatags.rb +21 -0
- data/lib/archangel/testing_support/factories/archangel_pages.rb +5 -7
- data/lib/archangel/testing_support/factories/archangel_sites.rb +1 -3
- data/lib/archangel/testing_support/factories/archangel_templates.rb +7 -7
- data/lib/archangel/testing_support/factories/archangel_users.rb +10 -10
- data/lib/archangel/testing_support/factories/archangel_widgets.rb +2 -2
- data/lib/archangel/testing_support/matchers/have_meta.rb +18 -0
- data/lib/archangel/testing_support/matchers/have_title.rb +18 -0
- data/lib/archangel/testing_support/rake/dummy_rake.rb +0 -2
- data/lib/archangel/version.rb +1 -1
- data/lib/generators/archangel/install/templates/config/archangel.yml +52 -37
- data/spec/controllers/archangel/backend/entries_controller_spec.rb +3 -3
- data/spec/controllers/archangel/backend/pages_controller_spec.rb +17 -1
- data/spec/controllers/archangel/backend/profiles_controller_spec.rb +1 -1
- data/spec/controllers/archangel/backend/sites_controller_spec.rb +6 -6
- data/spec/controllers/archangel/backend/users_controller_spec.rb +2 -2
- data/spec/controllers/archangel/frontend/pages_controller_spec.rb +2 -6
- data/spec/controllers/concerns/archangel/controllers/backend/resourceful_concern_spec.rb +90 -0
- data/spec/features/auth/registration_spec.rb +18 -0
- data/spec/features/frontend/liquid_drop_variables_spec.rb +51 -57
- data/spec/features/frontend/pages/homepage_redirect_spec.rb +2 -2
- data/spec/features/frontend/pages/metatags_spec.rb +73 -0
- data/spec/helpers/archangel/flash_helper_spec.rb +14 -0
- data/spec/lib/archangel/{command/extension_spec.rb → commands/extension_command_spec.rb} +3 -3
- data/spec/lib/archangel/commands/theme_command_spec.rb +100 -0
- data/spec/lib/archangel/liquid/drops/page_drop_spec.rb +1 -9
- data/spec/lib/archangel/liquid/drops/site_drop_spec.rb +2 -12
- data/spec/lib/archangel/liquid/tags/noembed_tag_spec.rb +76 -0
- data/spec/mailers/archangel/{application_job_spec.rb → application_mailer_spec.rb} +0 -0
- data/spec/models/archangel/metatag_spec.rb +22 -0
- data/spec/models/archangel/page_spec.rb +5 -2
- data/spec/models/archangel/site_spec.rb +2 -0
- data/spec/rails_helper.rb +1 -0
- data/spec/uploaders/archangel/application_uploader_spec.rb +1 -1
- data/spec/uploaders/archangel/asset_uploader_spec.rb +1 -1
- metadata +108 -93
- data/.reek +0 -44
- data/lib/archangel/command/extension.rb +0 -97
data/docs/Extension/Uploaders.md
CHANGED
@@ -1,3 +1,55 @@
|
|
1
1
|
# Uploaders
|
2
2
|
|
3
|
-
|
3
|
+
Uploaders are built on top of Carrierwave and should extend `Archangel::ApplicationUploader`.
|
4
|
+
|
5
|
+
Below is a basic example of an Uploader
|
6
|
+
|
7
|
+
```
|
8
|
+
# frozen_string_literal: true
|
9
|
+
|
10
|
+
module Archangel
|
11
|
+
class AmazingUploader < ApplicationUploader
|
12
|
+
version :large do
|
13
|
+
process resize_to_fit: [256, 256]
|
14
|
+
end
|
15
|
+
|
16
|
+
version :medium, from_version: :large do
|
17
|
+
process resize_to_fit: [128, 128]
|
18
|
+
end
|
19
|
+
|
20
|
+
version :small, from_version: :medium do
|
21
|
+
process resize_to_fit: [64, 64]
|
22
|
+
end
|
23
|
+
|
24
|
+
version :tiny, from_version: :small do
|
25
|
+
process resize_to_fit: [32, 32]
|
26
|
+
end
|
27
|
+
|
28
|
+
def default_path
|
29
|
+
"archangel/fallback/" + [version_name, "amazing.png"].compact.join("_")
|
30
|
+
end
|
31
|
+
|
32
|
+
def filename
|
33
|
+
"amazing.#{file.extension}" if original_filename.present?
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
```
|
38
|
+
|
39
|
+
## Default Image Path
|
40
|
+
|
41
|
+
When no file has been uploaded, fallback images for Carrierwave will need to be provided as well as default path to the fallback images.
|
42
|
+
|
43
|
+
Assuming `original`, `large`, `medium`, `small` and `tiny` as the sizes specified, the following images will need to be created;
|
44
|
+
|
45
|
+
* `archangel/fallback/amazing.jpg`
|
46
|
+
* `archangel/fallback/large_amazing.jpg`
|
47
|
+
* `archangel/fallback/medium_amazing.jpg`
|
48
|
+
* `archangel/fallback/small_amazing.jpg`
|
49
|
+
* `archangel/fallback/tiny_amazing.jpg`
|
50
|
+
|
51
|
+
These images will need to be added to the `app/assets/images/` directory. To change this path where fallback images life, override the `default_path` method.
|
52
|
+
|
53
|
+
## Upload Path
|
54
|
+
|
55
|
+
When `AmazingUploader` is used in the Page controller, `uploads/archangel/pages/amazing/123` will become the path for uploaded files. To change this path, override the `store_dir` method.
|
data/docs/Theme/Developers.md
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
# Theme Developers
|
2
2
|
|
3
|
-
Themes are meant to change the design of Archangel. Documentation for extension development is [also available](https://github.com/archangel/archangel/blob/master/docs/Extension/Developers.md).
|
3
|
+
Themes are meant to change the design and UI of Archangel. Documentation for extension development is [also available](https://github.com/archangel/archangel/blob/master/docs/Extension/Developers.md).
|
4
4
|
|
5
5
|
## Generate a theme
|
6
6
|
|
7
|
-
|
7
|
+
Generate an Archangel extension with `archangel theme NAME`
|
8
|
+
|
9
|
+
To generate an extension at `PWD` with the name `archangel_foo_theme`
|
10
|
+
|
11
|
+
```
|
12
|
+
$ archangel extension foo
|
13
|
+
```
|
data/lib/archangel.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "activerecord-typedstore"
|
3
4
|
require "acts_as_list"
|
4
5
|
require "acts_as_tree"
|
5
6
|
require "anyway_config"
|
@@ -22,10 +23,8 @@ require "paranoia"
|
|
22
23
|
require "popper_js"
|
23
24
|
require "pundit"
|
24
25
|
require "responders"
|
25
|
-
require "sass-rails"
|
26
26
|
require "selectize-rails"
|
27
27
|
require "simple_form"
|
28
|
-
require "uglifier"
|
29
28
|
require "validates"
|
30
29
|
|
31
30
|
require "archangel/engine"
|
@@ -47,6 +46,7 @@ require "archangel/liquid/tags/csrf_meta_tags_tag"
|
|
47
46
|
require "archangel/liquid/tags/gist_tag"
|
48
47
|
require "archangel/liquid/tags/locale_tag"
|
49
48
|
require "archangel/liquid/tags/meta_tags_tag"
|
49
|
+
require "archangel/liquid/tags/noembed_tag"
|
50
50
|
require "archangel/liquid/tags/text_direction_tag"
|
51
51
|
require "archangel/liquid/tags/theme_javascript_tag"
|
52
52
|
require "archangel/liquid/tags/theme_stylesheet_tag"
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "thor"
|
4
|
+
|
5
|
+
module Archangel
|
6
|
+
##
|
7
|
+
# Command line
|
8
|
+
#
|
9
|
+
module Commands
|
10
|
+
##
|
11
|
+
# Generate Archangel extension
|
12
|
+
#
|
13
|
+
class BaseCommand < Thor::Group
|
14
|
+
include Thor::Actions
|
15
|
+
|
16
|
+
no_tasks do
|
17
|
+
def plugin_class_name(plugin_name)
|
18
|
+
Thor::Util.camel_case(plugin_name)
|
19
|
+
end
|
20
|
+
|
21
|
+
def archangel_version
|
22
|
+
Archangel.version[/(.*)\./, 1]
|
23
|
+
end
|
24
|
+
|
25
|
+
def random_compliment
|
26
|
+
[
|
27
|
+
"You look lovely today by the way.",
|
28
|
+
"I have a feeling you're about to build something amazing.",
|
29
|
+
"Of all the people in the world, you're my favorite."
|
30
|
+
].sample
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,128 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "thor"
|
4
|
+
|
5
|
+
require "archangel/commands/base_command"
|
6
|
+
|
7
|
+
module Archangel
|
8
|
+
##
|
9
|
+
# Command line
|
10
|
+
#
|
11
|
+
module Commands
|
12
|
+
##
|
13
|
+
# Generate Archangel extension
|
14
|
+
#
|
15
|
+
class ExtensionCommand < BaseCommand
|
16
|
+
source_root File.expand_path("templates/extension", __dir__)
|
17
|
+
|
18
|
+
desc "Build an Archangel extension"
|
19
|
+
argument :extension_name, type: :string,
|
20
|
+
desc: "Extension name",
|
21
|
+
default: "sample"
|
22
|
+
|
23
|
+
##
|
24
|
+
# Generate extension
|
25
|
+
#
|
26
|
+
# Usage
|
27
|
+
# archangel extension [EXTENSION_NAME]
|
28
|
+
# bundle exec bin/archangel extension [EXTENSION_NAME]
|
29
|
+
#
|
30
|
+
def generate
|
31
|
+
name_plugin
|
32
|
+
end
|
33
|
+
|
34
|
+
##
|
35
|
+
# Create extension directory
|
36
|
+
#
|
37
|
+
def create_plugin_directory
|
38
|
+
empty_directory(extension_name)
|
39
|
+
end
|
40
|
+
|
41
|
+
##
|
42
|
+
# Create extension .gemspec file
|
43
|
+
#
|
44
|
+
def create_plugin_gemspec
|
45
|
+
template("extension.gemspec",
|
46
|
+
"#{extension_name}/#{extension_name}.gemspec")
|
47
|
+
end
|
48
|
+
|
49
|
+
##
|
50
|
+
# Copy common directories that are shared with theme generator
|
51
|
+
#
|
52
|
+
def copy_common_directories
|
53
|
+
%w[spec].each do |dir|
|
54
|
+
directory("../common/#{dir}", "#{extension_name}/#{dir}")
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
##
|
59
|
+
# Copy extension directories and chmod bin scripts
|
60
|
+
#
|
61
|
+
def copy_plugin_directories
|
62
|
+
%w[
|
63
|
+
app bin config lib
|
64
|
+
].each { |dir| directory(dir, "#{extension_name}/#{dir}") }
|
65
|
+
|
66
|
+
chmod("#{extension_name}/bin/rails", 0o755)
|
67
|
+
end
|
68
|
+
|
69
|
+
##
|
70
|
+
# Copy common templates that are shared with theme generator
|
71
|
+
#
|
72
|
+
def copy_common_templates
|
73
|
+
%w[
|
74
|
+
.editorconfig .gitignore .rspec .rubocop.yml MIT-LICENSE
|
75
|
+
].each do |tpl|
|
76
|
+
template("../common/#{tpl}", "#{extension_name}/#{tpl}")
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
##
|
81
|
+
# Copy extension templates
|
82
|
+
#
|
83
|
+
def copy_plugin_templates
|
84
|
+
%w[
|
85
|
+
Gemfile Rakefile README.md
|
86
|
+
].each { |tpl| template(tpl, "#{extension_name}/#{tpl}") }
|
87
|
+
end
|
88
|
+
|
89
|
+
##
|
90
|
+
# Banner
|
91
|
+
#
|
92
|
+
# Say something nice
|
93
|
+
#
|
94
|
+
def banner
|
95
|
+
puts %(
|
96
|
+
|
97
|
+
******************************************************************
|
98
|
+
|
99
|
+
Your extension has been generated with a gemspec dependency on
|
100
|
+
Archangel v#{archangel_version}
|
101
|
+
|
102
|
+
#{random_compliment}
|
103
|
+
|
104
|
+
******************************************************************
|
105
|
+
|
106
|
+
)
|
107
|
+
end
|
108
|
+
|
109
|
+
no_tasks do
|
110
|
+
def class_name
|
111
|
+
plugin_class_name(extension_name)
|
112
|
+
end
|
113
|
+
|
114
|
+
def name_plugin
|
115
|
+
@extension_name = corrected_plugin_name
|
116
|
+
end
|
117
|
+
|
118
|
+
def corrected_plugin_name
|
119
|
+
ext_name = extension_name.downcase
|
120
|
+
|
121
|
+
ext_name = "archangel_#{ext_name}" unless ext_name =~ /^archangel_/
|
122
|
+
|
123
|
+
Thor::Util.snake_case(ext_name)
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/archangel/{command/templates/extension → commands/templates/common}/spec/rails_helper.rb.tt
RENAMED
@@ -25,9 +25,6 @@ require "rspec/rails"
|
|
25
25
|
# Archangel support files
|
26
26
|
require "archangel/testing_support/support"
|
27
27
|
|
28
|
-
# Require factories defined in lib/<%= extension_name %>/factories.rb
|
29
|
-
require "<%= extension_name %>/factories"
|
30
|
-
|
31
28
|
# Local support files
|
32
29
|
Dir[Rails.root.join("../support/**/*.rb")].each { |f| require f }
|
33
30
|
|
data/lib/archangel/{command/templates/extension → commands/templates/common}/spec/spec_helper.rb
RENAMED
File without changes
|
data/lib/archangel/{command/templates/extension → commands/templates/common}/spec/support/.keep
RENAMED
File without changes
|
@@ -5,24 +5,23 @@ source "https://rubygems.org"
|
|
5
5
|
gemspec
|
6
6
|
|
7
7
|
group :development do
|
8
|
-
gem "rubocop", "~> 0.
|
8
|
+
gem "rubocop", "~> 0.59", require: false
|
9
9
|
end
|
10
10
|
|
11
11
|
group :development, :test do
|
12
|
-
gem "pry-byebug", "~> 3.
|
12
|
+
gem "pry-byebug", "~> 3.6"
|
13
13
|
gem "sqlite3", ">= 1.3", platforms: %i[ruby mswin mswin64 mingw x64_mingw]
|
14
|
-
gem "thor", "~> 0.
|
14
|
+
gem "thor", "~> 0.20"
|
15
15
|
end
|
16
16
|
|
17
17
|
group :test do
|
18
|
-
gem "capybara", "~>
|
19
|
-
gem "database_cleaner", "~> 1.
|
20
|
-
gem "factory_bot_rails", "~> 4.
|
21
|
-
gem "
|
22
|
-
gem "poltergeist", "~> 1.17"
|
18
|
+
gem "capybara", "~> 3.8"
|
19
|
+
gem "database_cleaner", "~> 1.7"
|
20
|
+
gem "factory_bot_rails", "~> 4.11"
|
21
|
+
gem "poltergeist", "~> 1.18"
|
23
22
|
gem "rails-controller-testing", "~> 1.0"
|
24
|
-
gem "rspec-rails", "~> 3.
|
23
|
+
gem "rspec-rails", "~> 3.8"
|
25
24
|
gem "shoulda-callback-matchers", "~> 1.1"
|
26
25
|
gem "shoulda-matchers", "~> 3.1"
|
27
|
-
gem "simplecov", "~> 0.
|
26
|
+
gem "simplecov", "~> 0.16"
|
28
27
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/archangel/{command → commands}/templates/extension/lib/%extension_name%/engine.rb.tt
RENAMED
File without changes
|
data/lib/archangel/{command → commands}/templates/extension/lib/%extension_name%/factories.rb.tt
RENAMED
File without changes
|
data/lib/archangel/{command → commands}/templates/extension/lib/%extension_name%/version.rb.tt
RENAMED
File without changes
|
File without changes
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
gemspec
|
6
|
+
|
7
|
+
group :development do
|
8
|
+
gem "rubocop", "~> 0.59", require: false
|
9
|
+
end
|
10
|
+
|
11
|
+
group :development, :test do
|
12
|
+
gem "pry-byebug", "~> 3.6"
|
13
|
+
gem "sqlite3", ">= 1.3", platforms: %i[ruby mswin mswin64 mingw x64_mingw]
|
14
|
+
gem "thor", "~> 0.20"
|
15
|
+
end
|
16
|
+
|
17
|
+
group :test do
|
18
|
+
gem "capybara", "~> 3.8"
|
19
|
+
gem "database_cleaner", "~> 1.7"
|
20
|
+
gem "factory_bot_rails", "~> 4.11"
|
21
|
+
gem "poltergeist", "~> 1.18"
|
22
|
+
gem "rails-controller-testing", "~> 1.0"
|
23
|
+
gem "rspec-rails", "~> 3.8"
|
24
|
+
gem "shoulda-callback-matchers", "~> 1.1"
|
25
|
+
gem "shoulda-matchers", "~> 3.1"
|
26
|
+
gem "simplecov", "~> 0.16"
|
27
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# <%= class_name %>
|
2
|
+
|
3
|
+
Introduction goes here.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add to your application's Gemfile
|
8
|
+
|
9
|
+
```
|
10
|
+
gem "<%= theme_name %>", github: "USERNAME/<%= theme_name %>"
|
11
|
+
```
|
12
|
+
|
13
|
+
Run the bundle command
|
14
|
+
|
15
|
+
```
|
16
|
+
$ bundle install
|
17
|
+
```
|
18
|
+
|
19
|
+
If your server was running, restart it to find the assets properly.
|
20
|
+
|
21
|
+
## Testing
|
22
|
+
|
23
|
+
First, generate a dummy application. You will be required to generate a dummy application before running tests.
|
24
|
+
|
25
|
+
```
|
26
|
+
$ bundle exec rake dummy_app
|
27
|
+
```
|
28
|
+
|
29
|
+
Run tests with any of the following
|
30
|
+
|
31
|
+
```
|
32
|
+
$ bundle exec rake
|
33
|
+
$ bundle exec rake spec
|
34
|
+
$ bundle exec rake test
|
35
|
+
$ bundle exec rspec spec
|
36
|
+
```
|
37
|
+
|
38
|
+
## Contributing
|
39
|
+
|
40
|
+
1. Fork it ( https://github.com/USERNAME/<%= theme_name %>/fork )
|
41
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
42
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
43
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
44
|
+
5. Create a new Pull Request
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
begin
|
4
|
+
require "bundler/setup"
|
5
|
+
rescue LoadError
|
6
|
+
puts "You must `gem install bundler` and `bundle install` to run rake tasks"
|
7
|
+
end
|
8
|
+
|
9
|
+
Bundler::GemHelper.install_tasks
|
10
|
+
|
11
|
+
require "bundler/gem_tasks"
|
12
|
+
require "rspec/core/rake_task"
|
13
|
+
|
14
|
+
require "archangel/testing_support/rake/dummy_rake"
|
15
|
+
|
16
|
+
RSpec::Core::RakeTask.new
|
17
|
+
|
18
|
+
task default: :spec
|
19
|
+
|
20
|
+
desc "Generates a dummy app for testing"
|
21
|
+
task :dummy_app do
|
22
|
+
# ENV["DB"] = "sqlite3" # mysql, postgresql, sqlite3, etc
|
23
|
+
ENV["LIB_NAME"] = "<%= theme_name %>"
|
24
|
+
|
25
|
+
Rake::Task["dummy:generate"].invoke
|
26
|
+
end
|
27
|
+
|
28
|
+
desc "Run RSpec tests"
|
29
|
+
task test: :spec
|