sharing_tags 0.0.2

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 (104) hide show
  1. checksums.yaml +7 -0
  2. data/.coveralls.yml +1 -0
  3. data/.gitignore +19 -0
  4. data/.rspec +4 -0
  5. data/.travis.yml +15 -0
  6. data/Gemfile +13 -0
  7. data/Guardfile +7 -0
  8. data/LICENSE.txt +22 -0
  9. data/README.md +112 -0
  10. data/Rakefile +14 -0
  11. data/app/assets/fonts/socicon-webfont.eot +0 -0
  12. data/app/assets/fonts/socicon-webfont.svg +112 -0
  13. data/app/assets/fonts/socicon-webfont.ttf +0 -0
  14. data/app/assets/fonts/socicon-webfont.woff +0 -0
  15. data/app/assets/fonts/socicon-webfont.woff2 +0 -0
  16. data/app/assets/javascripts/sharing_tags/links.js.coffee +11 -0
  17. data/app/assets/javascripts/sharing_tags/share.coffee +48 -0
  18. data/app/views/sharing_tags/_open_graphs.html.slim +21 -0
  19. data/app/views/sharing_tags/_schema_tags.html.slim +8 -0
  20. data/app/views/sharing_tags/_twitter_card.html.slim +20 -0
  21. data/app/views/sharing_tags/meta_tags.html.slim +16 -0
  22. data/bin/rspec +16 -0
  23. data/lib/generators/sharing_tags/install/install_generator.rb +18 -0
  24. data/lib/generators/sharing_tags/install/templates/initializer.rb +18 -0
  25. data/lib/generators/sharing_tags.rb +18 -0
  26. data/lib/sharing_tags/action_controller/filters.rb +13 -0
  27. data/lib/sharing_tags/action_controller/helpers.rb +7 -0
  28. data/lib/sharing_tags/action_view/helpers.rb +57 -0
  29. data/lib/sharing_tags/config.rb +33 -0
  30. data/lib/sharing_tags/configuration.rb +80 -0
  31. data/lib/sharing_tags/context.rb +96 -0
  32. data/lib/sharing_tags/engine.rb +6 -0
  33. data/lib/sharing_tags/network/facebook.rb +14 -0
  34. data/lib/sharing_tags/network.rb +102 -0
  35. data/lib/sharing_tags/railtie.rb +29 -0
  36. data/lib/sharing_tags/version.rb +3 -0
  37. data/lib/sharing_tags.rb +37 -0
  38. data/sharing_tags.gemspec +37 -0
  39. data/spec/controllers/main_controller_spec.rb +105 -0
  40. data/spec/dummy/.gitignore +16 -0
  41. data/spec/dummy/Gemfile +40 -0
  42. data/spec/dummy/Gemfile.lock +125 -0
  43. data/spec/dummy/README.rdoc +28 -0
  44. data/spec/dummy/Rakefile +6 -0
  45. data/spec/dummy/app/assets/images/.keep +0 -0
  46. data/spec/dummy/app/assets/javascripts/application.js +15 -0
  47. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  48. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  49. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  50. data/spec/dummy/app/controllers/main_controller.rb +25 -0
  51. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  52. data/spec/dummy/app/mailers/.keep +0 -0
  53. data/spec/dummy/app/models/.keep +0 -0
  54. data/spec/dummy/app/models/concerns/.keep +0 -0
  55. data/spec/dummy/app/views/layouts/application.html.erb +15 -0
  56. data/spec/dummy/app/views/main/index.html.slim +16 -0
  57. data/spec/dummy/app/views/main/photo.html.slim +1 -0
  58. data/spec/dummy/app/views/main/profile.html.slim +1 -0
  59. data/spec/dummy/bin/bundle +3 -0
  60. data/spec/dummy/bin/rails +8 -0
  61. data/spec/dummy/bin/rake +8 -0
  62. data/spec/dummy/bin/spring +18 -0
  63. data/spec/dummy/config/application.rb +23 -0
  64. data/spec/dummy/config/boot.rb +4 -0
  65. data/spec/dummy/config/database.yml +25 -0
  66. data/spec/dummy/config/environment.rb +5 -0
  67. data/spec/dummy/config/environments/development.rb +37 -0
  68. data/spec/dummy/config/environments/production.rb +79 -0
  69. data/spec/dummy/config/environments/test.rb +38 -0
  70. data/spec/dummy/config/initializers/assets.rb +8 -0
  71. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  72. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  73. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  74. data/spec/dummy/config/initializers/inflections.rb +16 -0
  75. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  76. data/spec/dummy/config/initializers/session_store.rb +3 -0
  77. data/spec/dummy/config/initializers/sharing_tags.rb +62 -0
  78. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  79. data/spec/dummy/config/locales/en.yml +23 -0
  80. data/spec/dummy/config/routes.rb +61 -0
  81. data/spec/dummy/config/secrets.yml +22 -0
  82. data/spec/dummy/config.ru +4 -0
  83. data/spec/dummy/db/seeds.rb +7 -0
  84. data/spec/dummy/lib/assets/.keep +0 -0
  85. data/spec/dummy/lib/tasks/.keep +0 -0
  86. data/spec/dummy/log/.keep +0 -0
  87. data/spec/dummy/public/404.html +67 -0
  88. data/spec/dummy/public/422.html +67 -0
  89. data/spec/dummy/public/500.html +66 -0
  90. data/spec/dummy/public/favicon.ico +0 -0
  91. data/spec/dummy/public/robots.txt +5 -0
  92. data/spec/dummy/vendor/assets/javascripts/.keep +0 -0
  93. data/spec/dummy/vendor/assets/stylesheets/.keep +0 -0
  94. data/spec/generators/install_generator_spec.rb +50 -0
  95. data/spec/helpers/share_link_helper_spec.rb +185 -0
  96. data/spec/models/configuration_spec.rb +180 -0
  97. data/spec/models/context_spec.rb +28 -0
  98. data/spec/models/network_spec.rb +6 -0
  99. data/spec/models/running_in_context_spec.rb +57 -0
  100. data/spec/spec_helper.rb +41 -0
  101. data/spec/support/generator_support.rb +11 -0
  102. data/spec/views/facebook_meta_tags_erb_spec.rb +60 -0
  103. data/spec/views/meta_tags_erb_spec.rb +67 -0
  104. metadata +409 -0
@@ -0,0 +1,38 @@
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # The test environment is used exclusively to run your application's
5
+ # test suite. You never need to work with it otherwise. Remember that
6
+ # your test database is "scratch space" for the test suite and is wiped
7
+ # and recreated between test runs. Don't rely on the data there!
8
+ config.cache_classes = true
9
+
10
+ # Do not eager load code on boot. This avoids loading your whole application
11
+ # just for the purpose of running a single test. If you are using a tool that
12
+ # preloads Rails for running tests, you may have to set it to true.
13
+ config.eager_load = false
14
+
15
+ # Configure static asset server for tests with Cache-Control for performance.
16
+ config.static_cache_control = 'public, max-age=3600'
17
+
18
+ # Show full error reports and disable caching.
19
+ config.consider_all_requests_local = true
20
+ config.action_controller.perform_caching = false
21
+
22
+ # Raise exceptions instead of rendering exception templates.
23
+ config.action_dispatch.show_exceptions = false
24
+
25
+ # Disable request forgery protection in test environment.
26
+ config.action_controller.allow_forgery_protection = false
27
+
28
+ # Tell Action Mailer not to deliver emails to the real world.
29
+ # The :test delivery method accumulates sent emails in the
30
+ # ActionMailer::Base.deliveries array.
31
+ config.action_mailer.delivery_method = :test
32
+
33
+ # Print deprecation notices to the stderr.
34
+ config.active_support.deprecation = :stderr
35
+
36
+ # Raises error for missing translations
37
+ # config.action_view.raise_on_missing_translations = true
38
+ end
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Version of your assets, change this if you want to expire all your assets.
4
+ Rails.application.config.assets.version = '1.0'
5
+
6
+ # Precompile additional assets.
7
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
8
+ # Rails.application.config.assets.precompile += %w( search.js )
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure sensitive parameters which will be filtered from the log file.
4
+ Rails.application.config.filter_parameters += [:password]
@@ -0,0 +1,16 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format. Inflections
4
+ # are locale specific, and you may define rules for as many different
5
+ # locales as you wish. All of these examples are active by default:
6
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
+ # inflect.plural /^(ox)$/i, '\1en'
8
+ # inflect.singular /^(ox)en/i, '\1'
9
+ # inflect.irregular 'person', 'people'
10
+ # inflect.uncountable %w( fish sheep )
11
+ # end
12
+
13
+ # These inflection rules are supported but not enabled by default:
14
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
+ # inflect.acronym 'RESTful'
16
+ # end
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.session_store :cookie_store, key: '_dummy_session'
@@ -0,0 +1,62 @@
1
+ # SharingTags.configure do
2
+ #
3
+ # # Activate default social network. Others available are:
4
+ # # :vkontakte,
5
+ # #networks :twitter, :facebook, :google
6
+ #
7
+ # share_url_params(utm_source: "some_source", utm_campaign: "some_campaign")
8
+ #
9
+ # title "Sharing title for all networks"
10
+ # description "Change me at /path"
11
+ # image { image_url("social/default.jpg") }
12
+ #
13
+ # facebook do
14
+ # title "Facebook title"
15
+ # end
16
+ #
17
+ # google do
18
+ # description "Google description"
19
+ # end
20
+ #
21
+ # #twitter do
22
+ # # share_url { "prepared_url" }
23
+ # # title "twitter title"
24
+ # # description { "some description" }
25
+ # # image { image_url("social/twitter.jpg") }
26
+ # #end
27
+ # #
28
+ # #
29
+ # ## for switching context call: sharing_tags(:photo, @photo, @date)
30
+ # #context :photo do
31
+ # # title { |photo, date| "Photo: #{photo.title}, #{date}" }
32
+ # #
33
+ # # google do
34
+ # # share_url { |photo, _| photo_url(photo.id)}
35
+ # # image_url { |photo, _| photo.image.share.url }
36
+ # # end
37
+ # #end
38
+ # #
39
+ # ## for switching context call: sharing_tags(:static)
40
+ # #context :static do
41
+ # # title "Static page"
42
+ # # image "http://some/image.jpg"
43
+ # #end
44
+ #
45
+ # # sharing_tags.
46
+ # # .title
47
+ # # .image
48
+ # # .twitter
49
+ # # .title
50
+ # # .facebook
51
+ # # .desciption
52
+ # # sharing_tags.image
53
+ # #
54
+ # # sharing_tags.to_a
55
+ # # sharing_tags.render_meta or sharing_tags.to_s
56
+ #
57
+ # #sharing_tags.facebook_data
58
+ # #sharing_tags.google_data
59
+ # #sharing_tags.link_data.facebook
60
+ # #
61
+ #
62
+ # end
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9
+ end
10
+
11
+ # To enable root element in JSON for ActiveRecord objects.
12
+ # ActiveSupport.on_load(:active_record) do
13
+ # self.include_root_in_json = true
14
+ # end
@@ -0,0 +1,23 @@
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
+ # To learn more, please read the Rails Internationalization guide
20
+ # available at http://guides.rubyonrails.org/i18n.html.
21
+
22
+ en:
23
+ hello: "Hello world"
@@ -0,0 +1,61 @@
1
+ Rails.application.routes.draw do
2
+
3
+ root "main#index"
4
+ get 'photo' => 'main#photo'
5
+ get 'profile' => 'main#profile'
6
+
7
+ # The priority is based upon order of creation: first created -> highest priority.
8
+ # See how all your routes lay out with "rake routes".
9
+
10
+ # You can have the root of your site routed with "root"
11
+ # root 'welcome#index'
12
+
13
+ # Example of regular route:
14
+ # get 'products/:id' => 'catalog#view'
15
+
16
+ # Example of named route that can be invoked with purchase_url(id: product.id)
17
+ # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
18
+
19
+ # Example resource route (maps HTTP verbs to controller actions automatically):
20
+ # resources :products
21
+
22
+ # Example resource route with options:
23
+ # resources :products do
24
+ # member do
25
+ # get 'short'
26
+ # post 'toggle'
27
+ # end
28
+ #
29
+ # collection do
30
+ # get 'sold'
31
+ # end
32
+ # end
33
+
34
+ # Example resource route with sub-resources:
35
+ # resources :products do
36
+ # resources :comments, :sales
37
+ # resource :seller
38
+ # end
39
+
40
+ # Example resource route with more complex sub-resources:
41
+ # resources :products do
42
+ # resources :comments
43
+ # resources :sales do
44
+ # get 'recent', on: :collection
45
+ # end
46
+ # end
47
+
48
+ # Example resource route with concerns:
49
+ # concern :toggleable do
50
+ # post 'toggle'
51
+ # end
52
+ # resources :posts, concerns: :toggleable
53
+ # resources :photos, concerns: :toggleable
54
+
55
+ # Example resource route within a namespace:
56
+ # namespace :admin do
57
+ # # Directs /admin/products/* to Admin::ProductsController
58
+ # # (app/controllers/admin/products_controller.rb)
59
+ # resources :products
60
+ # end
61
+ end
@@ -0,0 +1,22 @@
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 `rake 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
+ development:
14
+ secret_key_base: 2db917a1edd86cc94786352d65c3705ec263eea2e0e96b73f1d61ca2f527daa58a49c6d338735dd9f2a7f311bfae946fe4446a03674cc0f867033bcbc99d104b
15
+
16
+ test:
17
+ secret_key_base: bfa3d1d3df5a0ccb5d452c7ec416decbc21f3ba8285face41ff8e9596d59823253e8cba5896ea9ea00b10b8eb8e203903020e673df4e1e52654795a758a6dacf
18
+
19
+ # Do not keep production secrets in the repository,
20
+ # instead read values from the environment.
21
+ production:
22
+ secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Rails.application
@@ -0,0 +1,7 @@
1
+ # This file should contain all the record creation needed to seed the database with its default values.
2
+ # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
3
+ #
4
+ # Examples:
5
+ #
6
+ # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
7
+ # Mayor.create(name: 'Emanuel', city: cities.first)
File without changes
File without changes
File without changes
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/404.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The page you were looking for doesn't exist.</h1>
62
+ <p>You may have mistyped the address or the page may have moved.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/422.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The change you wanted was rejected.</h1>
62
+ <p>Maybe you tried to change something you didn't have access to.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,66 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/500.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>We're sorry, but something went wrong.</h1>
62
+ </div>
63
+ <p>If you are the application owner check the logs for more information.</p>
64
+ </div>
65
+ </body>
66
+ </html>
File without changes
@@ -0,0 +1,5 @@
1
+ # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
2
+ #
3
+ # To ban all spiders from the entire site uncomment the next two lines:
4
+ # User-agent: *
5
+ # Disallow: /
File without changes
File without changes
@@ -0,0 +1,50 @@
1
+ # Generators are not automatically loaded by Rails
2
+ require 'generators/sharing_tags/install/install_generator'
3
+
4
+ describe SharingTags::Generators::InstallGenerator, type: :generator do
5
+
6
+ # Tell the generator where to put its output (what it thinks of as Rails.root)
7
+ destination File.expand_path('../../tmp', __FILE__)
8
+ teardown :cleanup_destination_root
9
+
10
+ before do
11
+ prepare_destination
12
+ run_generator
13
+ end
14
+
15
+ describe 'initializer' do
16
+ let(:initializer) { content_for('config/initializers/sharing_tags.rb') }
17
+ subject { file 'config/initializers/sharing_tags.rb' }
18
+
19
+ it "creates a sharing_tags initializer" do
20
+ is_expected.to exist
21
+ end
22
+
23
+ it "generates config/initializers/sharing_tags.rb" do
24
+ generator_command_notice = / This file was generated by the `rails generate sharing_tags:install` command./m
25
+ is_expected.to contain(generator_command_notice)
26
+ end
27
+
28
+ it "expect has a valid syntax" do
29
+ is_expected.to have_correct_syntax
30
+ end
31
+ end
32
+
33
+ describe 'assets' do
34
+ pending
35
+ # subject { file 'app/controllers/sessions_controller.rb'}
36
+
37
+ # it { is_expected_to have_method :index }
38
+ end
39
+
40
+ describe 'view' do
41
+ pending
42
+ # subject { file 'app/views/sessions/new.html.erb'}
43
+ #
44
+ # it { is_expected_to have_correct_syntax }
45
+
46
+ end
47
+ end
48
+
49
+
50
+