faalis 2.0.8 → 2.1.0

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 (116) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +2 -0
  3. data.tar.gz.sig +0 -0
  4. data/Rakefile +15 -9
  5. data/app/assets/javascripts/faalis/dashboard/application.js.erb +4 -3
  6. data/app/assets/javascripts/faalis/dashboard/init.js.coffee +1 -1
  7. data/{spec/dummy/public/favicon.ico → app/assets/javascripts/faalis/dashboard/lib/amd.js.coffee.erb} +0 -0
  8. data/app/assets/stylesheets/faalis/dashboard/share.scss +5 -0
  9. data/app/controllers/faalis/assets_controller.rb +6 -0
  10. data/app/controllers/faalis/dashboard/user_messages_controller.rb +27 -0
  11. data/app/models/application_record.rb +3 -0
  12. data/app/models/faalis/group.rb +4 -3
  13. data/app/models/faalis/permission.rb +2 -2
  14. data/app/models/faalis/user.rb +1 -7
  15. data/app/models/faalis/user_message.rb +6 -0
  16. data/app/policies/faalis/user_message_policy.rb +9 -0
  17. data/app/policies/faalis/user_policy.rb +1 -1
  18. data/app/views/faalis/dashboard/resource/edit.html.slim +1 -1
  19. data/app/views/faalis/dashboard/resource/show.html.slim +1 -2
  20. data/app/views/faalis/dashboard/shared/_header.html.erb +2 -2
  21. data/app/views/faalis/dashboard/user_messages/_form.html.slim +0 -0
  22. data/app/views/faalis/dashboard/user_messages/create.js.erb +0 -0
  23. data/app/views/faalis/dashboard/user_messages/destroy.js.erb +0 -0
  24. data/app/views/faalis/dashboard/user_messages/new.html.slim +72 -0
  25. data/app/views/layouts/faalis/dashboard.html.erb +2 -1
  26. data/config/locales/faalis.en.yml +2 -1
  27. data/config/routes.rb +6 -21
  28. data/db/migrate/20160310105736_create_faalis_user_messages.rb +16 -0
  29. data/lib/faalis.rb +1 -1
  30. data/lib/faalis/configuration.rb +79 -52
  31. data/lib/faalis/dashboard/dsl.rb +1 -0
  32. data/lib/faalis/dashboard/models/sidebar.rb +42 -16
  33. data/lib/faalis/dashboard/sections/resource.rb +152 -130
  34. data/lib/faalis/dashboard/sections/resource_create.rb +1 -3
  35. data/lib/faalis/engine.rb +7 -5
  36. data/lib/faalis/orm.rb +5 -5
  37. data/lib/faalis/version.rb +1 -1
  38. data/{spec → test}/dummy/README.rdoc +0 -0
  39. data/{spec → test}/dummy/Rakefile +0 -0
  40. data/{spec → test}/dummy/app/assets/javascripts/application.js +0 -0
  41. data/{spec → test}/dummy/app/assets/javascripts/dashboard/application.js +0 -0
  42. data/{spec → test}/dummy/app/assets/stylesheets/application.css +0 -0
  43. data/{spec → test}/dummy/app/assets/stylesheets/dashboard/ltr/application.css +0 -0
  44. data/{spec → test}/dummy/app/assets/stylesheets/dashboard/rtl/application.css +0 -0
  45. data/{spec → test}/dummy/app/assets/stylesheets/ltr/application.css +0 -0
  46. data/{spec → test}/dummy/app/assets/stylesheets/rtl/application.css +0 -0
  47. data/{spec → test}/dummy/app/controllers/api_controller.rb +0 -0
  48. data/{spec → test}/dummy/app/controllers/application_controller.rb +0 -0
  49. data/{spec → test}/dummy/app/controllers/dashboard/application_controller.rb +0 -0
  50. data/{spec → test}/dummy/app/helpers/application_helper.rb +0 -0
  51. data/{spec → test}/dummy/app/policies/application_policy.rb +0 -0
  52. data/{spec → test}/dummy/app/views/layouts/application.html.erb +0 -0
  53. data/{spec → test}/dummy/bin/bundle +0 -0
  54. data/{spec → test}/dummy/bin/rails +0 -0
  55. data/{spec → test}/dummy/bin/rake +0 -0
  56. data/{spec → test}/dummy/config.ru +0 -0
  57. data/{spec → test}/dummy/config/application.rb +0 -0
  58. data/{spec → test}/dummy/config/boot.rb +0 -0
  59. data/{spec → test}/dummy/config/database.yml +0 -0
  60. data/{spec → test}/dummy/config/environment.rb +0 -0
  61. data/{spec → test}/dummy/config/environments/development.rb +0 -0
  62. data/{spec → test}/dummy/config/environments/production.rb +0 -0
  63. data/{spec → test}/dummy/config/environments/test.rb +2 -0
  64. data/{spec → test}/dummy/config/initializers/backtrace_silencers.rb +0 -0
  65. data/{spec → test}/dummy/config/initializers/devise.rb +0 -0
  66. data/{spec → test}/dummy/config/initializers/faalis.rb +0 -0
  67. data/{spec → test}/dummy/config/initializers/faalis_assets.rb +0 -0
  68. data/{spec → test}/dummy/config/initializers/filter_parameter_logging.rb +0 -0
  69. data/{spec → test}/dummy/config/initializers/formstatic.rb +0 -0
  70. data/{spec → test}/dummy/config/initializers/formtastic.rb +0 -0
  71. data/{spec → test}/dummy/config/initializers/inflections.rb +0 -0
  72. data/{spec → test}/dummy/config/initializers/kaminari_config.rb +0 -0
  73. data/{spec → test}/dummy/config/initializers/mime_types.rb +0 -0
  74. data/{spec → test}/dummy/config/initializers/secret_token.rb +0 -0
  75. data/{spec → test}/dummy/config/initializers/session_store.rb +0 -0
  76. data/{spec → test}/dummy/config/initializers/wrap_parameters.rb +0 -0
  77. data/{spec → test}/dummy/config/locales/en.yml +0 -0
  78. data/{spec → test}/dummy/config/routes.rb +0 -0
  79. data/test/dummy/db/test.sqlite3 +0 -0
  80. data/{spec → test}/dummy/lib/templates/slim/scaffold/_form.html.slim +0 -0
  81. data/test/dummy/log/test.log +0 -0
  82. data/{spec → test}/dummy/public/404.html +0 -0
  83. data/{spec → test}/dummy/public/422.html +0 -0
  84. data/{spec → test}/dummy/public/500.html +0 -0
  85. data/test/dummy/public/favicon.ico +0 -0
  86. data/test/fabricators/faalis/groups.rb +27 -0
  87. data/test/fabricators/faalis/permissions.rb +14 -0
  88. data/test/fabricators/faalis/users.rb +17 -0
  89. data/test/generators/install_generator_test.rb +84 -0
  90. data/test/integration/faalis/authentication_test.rb +36 -0
  91. data/test/integration/faalis/dashboard_test.rb +64 -0
  92. data/test/test_helper.rb +72 -0
  93. metadata +291 -150
  94. metadata.gz.sig +1 -0
  95. data/app/controllers/faalis/api/v1/conversations_controller.rb +0 -120
  96. data/app/controllers/faalis/api/v1/groups_controller.rb +0 -71
  97. data/app/controllers/faalis/api/v1/logs_controller.rb +0 -12
  98. data/app/controllers/faalis/api/v1/permissions_controller.rb +0 -61
  99. data/app/controllers/faalis/api/v1/profiles_controller.rb +0 -42
  100. data/app/controllers/faalis/api/v1/users_controller.rb +0 -75
  101. data/lib/faalis_application.rb +0 -446
  102. data/lib/faalis_plugin.rb +0 -477
  103. data/spec/factories/faalis/groups.rb +0 -31
  104. data/spec/factories/faalis/permissions.rb +0 -16
  105. data/spec/factories/faalis/users.rb +0 -23
  106. data/spec/features/dashboard_spec.rb +0 -36
  107. data/spec/features/record_not_found_spec.rb +0 -24
  108. data/spec/features/sign_in_spec.rb +0 -37
  109. data/spec/generators/install_spec.rb +0 -58
  110. data/spec/models/faalis/group_spec.rb +0 -32
  111. data/spec/models/faalis/permission_spec.rb +0 -15
  112. data/spec/models/faalis/user_spec.rb +0 -100
  113. data/spec/policies/faalis/admin_only_policy_spec.rb +0 -39
  114. data/spec/policies/faalis/application_policy_spec.rb +0 -49
  115. data/spec/spec_helper.rb +0 -89
  116. data/spec/support/factory_girl.rb +0 -3
@@ -0,0 +1 @@
1
+ a��W{D��(���WJ���~i:ü+�cฒ*�MKm��r�xlX���b,���,rq^�wҚD��B��Lm��n;�I��xZq{huG�`͌AW�¤ٵ��U��r��# �iƮ�)��P�QB�={�)�Z�WJ���`�Ɖ���.=�w&�V ���~��r6��m��, c��)�X Rƿ_���y*��V��U�ًO�2+����fY��}��%��Y@Kf1��n]*:��H6^���p���Kof�
@@ -1,120 +0,0 @@
1
- require_dependency "faalis/application_controller"
2
-
3
- module Faalis
4
- class API::V1::ConversationsController < ::APIController
5
- before_filter :authenticate_user!
6
- helper_method :mailbox, :conversation
7
-
8
- def create
9
- #binding.pry
10
- recipient_emails = message_params(:recipients).split(',')
11
- recipients = User.where(email: recipient_emails).all
12
-
13
- @conversation = current_user.
14
- send_message(recipients, *message_params(:body, :subject)).conversation
15
-
16
- respond_with(@conversation)
17
- end
18
-
19
- def reply
20
- @conversation = current_user.reply_to_conversation(conversation, *message_params(:body, :subject))
21
- respond_with(@conversation)
22
- end
23
-
24
- def trash
25
- ids = params[:id].split(",")
26
- ids.each do |id|
27
- conversation = current_user.mailbox.conversations.find(params[:id])
28
- conversation.move_to_trash(current_user)
29
- end
30
- end
31
-
32
- def untrash
33
- ids = params[:id].split(",")
34
- ids.each do |id|
35
- conversation = current_user.mailbox.conversations.find(params[:id])
36
- conversation.untrash(current_user)
37
- end
38
-
39
- end
40
-
41
- def destroy
42
- ids = params[:id].split(",")
43
- ids.each do |id|
44
- conversation = current_user.mailbox.conversations.find(params[:id])
45
- current_user.mark_as_deleted conversation
46
- #conversation.mark_as_deleted(current_user)
47
- end
48
- respond_with
49
- end
50
-
51
- def index
52
- if params[:box] == "inbox"
53
- box = "inbox"
54
- elsif params[:box] == "sentbox"
55
- box = "sentbox"
56
- elsif params[:box] == "trash"
57
- box = "trash"
58
- else
59
- respond_to do |f|
60
- f.any { head :not_found }
61
- end
62
- returng
63
- end
64
- # puts current_user.mailbox.sent.to_json
65
- @mailbox ||= current_user.mailbox.send(box.to_sym)
66
- respond_with @mailbox
67
- end
68
-
69
-
70
- def show
71
- #def conversation
72
- @conversations ||= current_user.mailbox.conversations.find(params[:id])
73
- @current_user = current_user
74
- # @conversation = {}
75
- # conversations.each do |conversation|
76
- # tmp = {
77
- # :receipts => conversation.receipts,
78
- # :body => conversation.messages.body,
79
- # :is_read => conversation.is_read,
80
- # :trashed => conversation.trashed,
81
- # :deleted => conversation.deleted,
82
- # :recipients => conversation.recipients
83
- # }
84
- #unless @conversation.include? conversation.id
85
- # @conversation[conversation.id] = tmp
86
- #end
87
- #end
88
-
89
- end
90
- private
91
-
92
- def mailbox
93
- @mailbox ||= current_user.mailbox
94
- end
95
-
96
-
97
- def conversation
98
- @conversation ||= mailbox.conversations.find(params[:id])
99
- end
100
-
101
- def conversation_params(*keys)
102
- fetch_params(:conversation, *keys)
103
- end
104
-
105
- def message_params(*keys)
106
- fetch_params(:message, *keys)
107
- end
108
-
109
- def fetch_params(key, *subkeys)
110
- params[key].instance_eval do
111
- case subkeys.size
112
- when 0 then self
113
- when 1 then
114
- self[subkeys.first]
115
- else subkeys.map{|k| self[k] }
116
- end
117
- end
118
- end
119
- end
120
- end
@@ -1,71 +0,0 @@
1
- require_dependency 'faalis/api_controller'
2
-
3
- class Faalis::API::V1::GroupsController < ::APIController
4
- # TODO: Use strong params
5
- after_action :verify_authorized, :except => :index
6
-
7
- # GET /api/v1/groups
8
- def index
9
- @groups = Faalis::Group.includes(:permissions).all
10
- authorize @groups
11
- respond_with(@groups)
12
- end
13
-
14
- def create
15
-
16
- authorize Faalis::Group, :create?
17
- permissions = [];
18
-
19
- (params[:permissions] || []).each do |perm_string|
20
- perm, model = perm_string.split "|"
21
- permission = Faalis::Permission.find_or_create_by_model_and_permission_type(model, perm)
22
- permissions << permission
23
- end
24
-
25
- @group = Faalis::Group.new({ name: params[:name],
26
- permissions: permissions })
27
- if @group.save
28
- respond_with(@group)
29
- else
30
- respond_to do |format|
31
- format.json { render json: { fields: @group.errors },
32
- status: :unprocessable_entity }
33
- end
34
- end
35
- end
36
-
37
- def show
38
- @group = Faalis::Group.find(params[:id])
39
- authorize @group
40
- respond_with(@group)
41
- end
42
-
43
- def update
44
- @group = Faalis::Group.find(params[:id])
45
- authorize @group
46
-
47
- permissions = [];
48
- (params[:permissions] || []).each do |perm_string|
49
- perm, model = perm_string.split '|'
50
- permission = Faalis::Permission.find_or_create_by_model_and_permission_type(model, perm)
51
- permissions << permission
52
- end
53
-
54
- if @group.update(:name => params[:name],
55
- :permissions => permissions)
56
- respond_with(@group)
57
- else
58
- respond_to do |format|
59
- format.json { render json: { fields: @group.errors },
60
- status: :unprocessable_entity }
61
- end
62
- end
63
- end
64
-
65
- def destroy
66
- ids = params[:id].split(",")
67
- @groups = Faalis::Group.where(:id => ids)
68
- authorize @groups
69
- @groups.destroy_all
70
- end
71
- end
@@ -1,12 +0,0 @@
1
- require_dependency "faalis/api_controller"
2
-
3
- module Faalis
4
- class API::V1::LogsController < ::APIController
5
-
6
- # GET /api/v1/logs
7
- def index
8
- @data = File.open("#{Rails.root}/log/#{Rails.env}.log").read(4096)
9
- respond_with(@data)
10
- end
11
- end
12
- end
@@ -1,61 +0,0 @@
1
- require_dependency "faalis/application_controller"
2
-
3
- module Faalis
4
- class API::V1::PermissionsController < ::APIController
5
-
6
- skip_after_action :verify_authorized
7
- respond_to :json
8
-
9
- class DummyPerm
10
- attr_accessor :model, :permission_type
11
- end
12
-
13
- # api GET permissions
14
- # return All permissions
15
- def index
16
- @permissions = {}
17
-
18
- Faalis::Permission.all.each do |perm|
19
- if @permissions.include? perm.model
20
- @permissions[perm.model] << perm.action
21
- else
22
- @permissions[perm.model] = [perm.action]
23
- end
24
- end
25
-
26
- respond_with(@permissions)
27
- end
28
-
29
- # api GET permissions/user
30
- # return current user permissions
31
- def user_permissions
32
-
33
- @permissions = {}
34
- current_user.permissions.each do |perm|
35
- if @permissions.include? perm.model
36
- @permissions[perm.model] << perm.action
37
- else
38
- @permissions[perm.model] = [perm.action]
39
- end
40
- end
41
-
42
- respond_with(@permissions)
43
- return
44
-
45
- @permissions = {}
46
- perms = []
47
-
48
- # Generate a suitable Hash for permissions
49
- perms.each do |perm|
50
- if @permissions.include? perm.model
51
- @permissions[perm.model] << perm.permission_type.to_s
52
- @permissions[perm.model] = @permissions[perm.model].uniq
53
- else
54
- @permissions[perm.model] = [perm.permission_type.to_s]
55
- end
56
- end
57
- respond_with(@permissions)
58
- end
59
-
60
- end
61
- end
@@ -1,42 +0,0 @@
1
- require_dependency "faalis/application_controller"
2
-
3
- module Faalis
4
- class API::V1::ProfilesController < ::APIController
5
-
6
- def show
7
- @user = current_user
8
- respond_with(@user)
9
- end
10
-
11
- def update
12
- @user = current_user
13
- user_fields = {
14
- :first_name => params[:first_name],
15
- :last_name => params[:last_name],
16
- :email => params[:email],
17
- }
18
-
19
- if params.include? :password and params[:password]
20
- user_fields[:password] = params[:password]
21
- user_fields[:password_confirmation] = params[:password_confirmation]
22
-
23
- if @user.update(user_fields)
24
- respond_with(@user)
25
- else
26
- respond_to do |format|
27
- format.json { render :json => {:fields => @user.errors}, :status => :unprocessable_entity }
28
- end
29
- end
30
- else
31
-
32
- if @user.update_without_password(user_fields)
33
- respond_with(@user)
34
- else
35
- respond_to do |format|
36
- format.json { render :json => {:fields => @user.errors}, :status => :unprocessable_entity }
37
- end
38
- end
39
- end
40
- end
41
- end
42
- end
@@ -1,75 +0,0 @@
1
- require_dependency "faalis/application_controller"
2
-
3
- module Faalis
4
- class API::V1::UsersController < ::APIController
5
-
6
- def index
7
- @users = User.joins(:groups).all
8
- #authorize! :read, @users
9
- respond_with(@users)
10
- end
11
-
12
- def show
13
- @user = User.find(params[:id])
14
- authorize! :read, @user
15
- respond_with(@user)
16
- end
17
-
18
- def destroy
19
- ids = params[:id].split(",")
20
- @users = User.where(:id => ids)
21
- authorize! :destory, @users
22
- @users.destroy_all
23
- end
24
-
25
- def update
26
- @user = User.find(params[:id])
27
- authorize! :update, @user
28
- user_fields = {
29
- :first_name => params[:first_name],
30
- :last_name => params[:last_name],
31
- :email => params[:email],
32
- }
33
-
34
- if params.include? :password and params[:password]
35
- user_fields[:password] = params[:password]
36
- end
37
-
38
- if params.include? :groups and params[:groups]
39
- user_fields[:groups] = Group.find(params[:groups]) || nil
40
- end
41
-
42
- if @user.update(user_fields)
43
- respond_with(@user)
44
- else
45
- respond_to do |format|
46
- format.json { render :json => {:fields => @user.errors}, :status => :unprocessable_entity }
47
- end
48
- end
49
- end
50
-
51
- def create
52
- authorize! :create, Faalis::User
53
-
54
- @user = User.new({
55
- first_name: params[:first_name],
56
- last_name: params[:last_name],
57
- email: params[:email],
58
- password: params[:password],
59
- })
60
-
61
- if params.include? :groups
62
- group = Group.find(params[:groups]) || nil
63
- @user.groups = group
64
- end
65
-
66
- if @user.save
67
- respond_with(@user)
68
- else
69
- respond_to do |format|
70
- format.json { render :json => {:fields => @user.errors}, :status => :unprocessable_entity }
71
- end
72
- end
73
- end
74
- end
75
- end
@@ -1,446 +0,0 @@
1
- say
2
-
3
- app_name = ask("What's your app name: ").downcase.underscore
4
-
5
- add_source 'https://rails-assets.org'
6
-
7
- gem_group :development do
8
- gem 'pry-rails'
9
- gem 'annotate'
10
- gem 'hirb'
11
- gem 'quiet_assets' # unclutters the server log from assets
12
- gem 'better_errors'
13
- gem 'binding_of_caller'
14
- gem 'meta_request'
15
- gem 'pry-byebug'
16
- #gem 'puma'
17
- end
18
-
19
- gem 'slim-rails'
20
- gem 'dashstrap', github: 'Yellowen/dashstrap'
21
- gem 'faalis', github: 'Yellowen/Faalis'
22
-
23
- inside app_name do
24
- run 'bundle install'
25
- run 'rake faalis:install:migrations'
26
- end
27
-
28
- application do
29
- 'config.railties_order = [:main_app, Dashstrap::TemplateEngine, Faalis::Engine, :all]'
30
- end
31
-
32
- rakefile 'db.rake' do
33
- %Q(
34
- namespace :db do
35
- task fresh: :environment do
36
- system "rm \#{Rails.root}/db/development.sqlite3"
37
- system "rake db:migrate --trace"
38
- system "rake db:seed --trace"
39
- end
40
- end
41
- )
42
- end
43
-
44
- generate 'faalis:install_all'
45
-
46
- initializer 'assets.rb' do
47
- %Q(
48
- Rails.application.config.assets.precompile += ['fontawesome-webfont.eot',
49
- 'fontawesome-webfont.woff',
50
- 'fontawesome-webfont.ttf',
51
- 'fontawesome-webfont.svg']
52
-
53
- )
54
- end
55
-
56
- git :init
57
- create_file "LICENSE" do
58
- <<-'CODE'
59
- GNU GENERAL PUBLIC LICENSE
60
- Version 2, June 1991
61
-
62
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
63
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
64
- Everyone is permitted to copy and distribute verbatim copies
65
- of this license document, but changing it is not allowed.
66
-
67
- Preamble
68
-
69
- The licenses for most software are designed to take away your
70
- freedom to share and change it. By contrast, the GNU General Public
71
- License is intended to guarantee your freedom to share and change free
72
- software--to make sure the software is free for all its users. This
73
- General Public License applies to most of the Free Software
74
- Foundation's software and to any other program whose authors commit to
75
- using it. (Some other Free Software Foundation software is covered by
76
- the GNU Lesser General Public License instead.) You can apply it to
77
- your programs, too.
78
-
79
- When we speak of free software, we are referring to freedom, not
80
- price. Our General Public Licenses are designed to make sure that you
81
- have the freedom to distribute copies of free software (and charge for
82
- this service if you wish), that you receive source code or can get it
83
- if you want it, that you can change the software or use pieces of it
84
- in new free programs; and that you know you can do these things.
85
-
86
- To protect your rights, we need to make restrictions that forbid
87
- anyone to deny you these rights or to ask you to surrender the rights.
88
- These restrictions translate to certain responsibilities for you if you
89
- distribute copies of the software, or if you modify it.
90
-
91
- For example, if you distribute copies of such a program, whether
92
- gratis or for a fee, you must give the recipients all the rights that
93
- you have. You must make sure that they, too, receive or can get the
94
- source code. And you must show them these terms so they know their
95
- rights.
96
-
97
- We protect your rights with two steps: (1) copyright the software, and
98
- (2) offer you this license which gives you legal permission to copy,
99
- distribute and/or modify the software.
100
-
101
- Also, for each author's protection and ours, we want to make certain
102
- that everyone understands that there is no warranty for this free
103
- software. If the software is modified by someone else and passed on, we
104
- want its recipients to know that what they have is not the original, so
105
- that any problems introduced by others will not reflect on the original
106
- authors' reputations.
107
-
108
- Finally, any free program is threatened constantly by software
109
- patents. We wish to avoid the danger that redistributors of a free
110
- program will individually obtain patent licenses, in effect making the
111
- program proprietary. To prevent this, we have made it clear that any
112
- patent must be licensed for everyone's free use or not licensed at all.
113
-
114
- The precise terms and conditions for copying, distribution and
115
- modification follow.
116
-
117
- GNU GENERAL PUBLIC LICENSE
118
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
119
-
120
- 0. This License applies to any program or other work which contains
121
- a notice placed by the copyright holder saying it may be distributed
122
- under the terms of this General Public License. The "Program", below,
123
- refers to any such program or work, and a "work based on the Program"
124
- means either the Program or any derivative work under copyright law:
125
- that is to say, a work containing the Program or a portion of it,
126
- either verbatim or with modifications and/or translated into another
127
- language. (Hereinafter, translation is included without limitation in
128
- the term "modification".) Each licensee is addressed as "you".
129
-
130
- Activities other than copying, distribution and modification are not
131
- covered by this License; they are outside its scope. The act of
132
- running the Program is not restricted, and the output from the Program
133
- is covered only if its contents constitute a work based on the
134
- Program (independent of having been made by running the Program).
135
- Whether that is true depends on what the Program does.
136
-
137
- 1. You may copy and distribute verbatim copies of the Program's
138
- source code as you receive it, in any medium, provided that you
139
- conspicuously and appropriately publish on each copy an appropriate
140
- copyright notice and disclaimer of warranty; keep intact all the
141
- notices that refer to this License and to the absence of any warranty;
142
- and give any other recipients of the Program a copy of this License
143
- along with the Program.
144
-
145
- You may charge a fee for the physical act of transferring a copy, and
146
- you may at your option offer warranty protection in exchange for a fee.
147
-
148
- 2. You may modify your copy or copies of the Program or any portion
149
- of it, thus forming a work based on the Program, and copy and
150
- distribute such modifications or work under the terms of Section 1
151
- above, provided that you also meet all of these conditions:
152
-
153
- a) You must cause the modified files to carry prominent notices
154
- stating that you changed the files and the date of any change.
155
-
156
- b) You must cause any work that you distribute or publish, that in
157
- whole or in part contains or is derived from the Program or any
158
- part thereof, to be licensed as a whole at no charge to all third
159
- parties under the terms of this License.
160
-
161
- c) If the modified program normally reads commands interactively
162
- when run, you must cause it, when started running for such
163
- interactive use in the most ordinary way, to print or display an
164
- announcement including an appropriate copyright notice and a
165
- notice that there is no warranty (or else, saying that you provide
166
- a warranty) and that users may redistribute the program under
167
- these conditions, and telling the user how to view a copy of this
168
- License. (Exception: if the Program itself is interactive but
169
- does not normally print such an announcement, your work based on
170
- the Program is not required to print an announcement.)
171
-
172
- These requirements apply to the modified work as a whole. If
173
- identifiable sections of that work are not derived from the Program,
174
- and can be reasonably considered independent and separate works in
175
- themselves, then this License, and its terms, do not apply to those
176
- sections when you distribute them as separate works. But when you
177
- distribute the same sections as part of a whole which is a work based
178
- on the Program, the distribution of the whole must be on the terms of
179
- this License, whose permissions for other licensees extend to the
180
- entire whole, and thus to each and every part regardless of who wrote it.
181
-
182
- Thus, it is not the intent of this section to claim rights or contest
183
- your rights to work written entirely by you; rather, the intent is to
184
- exercise the right to control the distribution of derivative or
185
- collective works based on the Program.
186
-
187
- In addition, mere aggregation of another work not based on the Program
188
- with the Program (or with a work based on the Program) on a volume of
189
- a storage or distribution medium does not bring the other work under
190
- the scope of this License.
191
-
192
- 3. You may copy and distribute the Program (or a work based on it,
193
- under Section 2) in object code or executable form under the terms of
194
- Sections 1 and 2 above provided that you also do one of the following:
195
-
196
- a) Accompany it with the complete corresponding machine-readable
197
- source code, which must be distributed under the terms of Sections
198
- 1 and 2 above on a medium customarily used for software interchange; or,
199
-
200
- b) Accompany it with a written offer, valid for at least three
201
- years, to give any third party, for a charge no more than your
202
- cost of physically performing source distribution, a complete
203
- machine-readable copy of the corresponding source code, to be
204
- distributed under the terms of Sections 1 and 2 above on a medium
205
- customarily used for software interchange; or,
206
-
207
- c) Accompany it with the information you received as to the offer
208
- to distribute corresponding source code. (This alternative is
209
- allowed only for noncommercial distribution and only if you
210
- received the program in object code or executable form with such
211
- an offer, in accord with Subsection b above.)
212
-
213
- The source code for a work means the preferred form of the work for
214
- making modifications to it. For an executable work, complete source
215
- code means all the source code for all modules it contains, plus any
216
- associated interface definition files, plus the scripts used to
217
- control compilation and installation of the executable. However, as a
218
- special exception, the source code distributed need not include
219
- anything that is normally distributed (in either source or binary
220
- form) with the major components (compiler, kernel, and so on) of the
221
- operating system on which the executable runs, unless that component
222
- itself accompanies the executable.
223
-
224
- If distribution of executable or object code is made by offering
225
- access to copy from a designated place, then offering equivalent
226
- access to copy the source code from the same place counts as
227
- distribution of the source code, even though third parties are not
228
- compelled to copy the source along with the object code.
229
-
230
- 4. You may not copy, modify, sublicense, or distribute the Program
231
- except as expressly provided under this License. Any attempt
232
- otherwise to copy, modify, sublicense or distribute the Program is
233
- void, and will automatically terminate your rights under this License.
234
- However, parties who have received copies, or rights, from you under
235
- this License will not have their licenses terminated so long as such
236
- parties remain in full compliance.
237
-
238
- 5. You are not required to accept this License, since you have not
239
- signed it. However, nothing else grants you permission to modify or
240
- distribute the Program or its derivative works. These actions are
241
- prohibited by law if you do not accept this License. Therefore, by
242
- modifying or distributing the Program (or any work based on the
243
- Program), you indicate your acceptance of this License to do so, and
244
- all its terms and conditions for copying, distributing or modifying
245
- the Program or works based on it.
246
-
247
- 6. Each time you redistribute the Program (or any work based on the
248
- Program), the recipient automatically receives a license from the
249
- original licensor to copy, distribute or modify the Program subject to
250
- these terms and conditions. You may not impose any further
251
- restrictions on the recipients' exercise of the rights granted herein.
252
- You are not responsible for enforcing compliance by third parties to
253
- this License.
254
-
255
- 7. If, as a consequence of a court judgment or allegation of patent
256
- infringement or for any other reason (not limited to patent issues),
257
- conditions are imposed on you (whether by court order, agreement or
258
- otherwise) that contradict the conditions of this License, they do not
259
- excuse you from the conditions of this License. If you cannot
260
- distribute so as to satisfy simultaneously your obligations under this
261
- License and any other pertinent obligations, then as a consequence you
262
- may not distribute the Program at all. For example, if a patent
263
- license would not permit royalty-free redistribution of the Program by
264
- all those who receive copies directly or indirectly through you, then
265
- the only way you could satisfy both it and this License would be to
266
- refrain entirely from distribution of the Program.
267
-
268
- If any portion of this section is held invalid or unenforceable under
269
- any particular circumstance, the balance of the section is intended to
270
- apply and the section as a whole is intended to apply in other
271
- circumstances.
272
-
273
- It is not the purpose of this section to induce you to infringe any
274
- patents or other property right claims or to contest validity of any
275
- such claims; this section has the sole purpose of protecting the
276
- integrity of the free software distribution system, which is
277
- implemented by public license practices. Many people have made
278
- generous contributions to the wide range of software distributed
279
- through that system in reliance on consistent application of that
280
- system; it is up to the author/donor to decide if he or she is willing
281
- to distribute software through any other system and a licensee cannot
282
- impose that choice.
283
-
284
- This section is intended to make thoroughly clear what is believed to
285
- be a consequence of the rest of this License.
286
-
287
- 8. If the distribution and/or use of the Program is restricted in
288
- certain countries either by patents or by copyrighted interfaces, the
289
- original copyright holder who places the Program under this License
290
- may add an explicit geographical distribution limitation excluding
291
- those countries, so that distribution is permitted only in or among
292
- countries not thus excluded. In such case, this License incorporates
293
- the limitation as if written in the body of this License.
294
-
295
- 9. The Free Software Foundation may publish revised and/or new versions
296
- of the General Public License from time to time. Such new versions will
297
- be similar in spirit to the present version, but may differ in detail to
298
- address new problems or concerns.
299
-
300
- Each version is given a distinguishing version number. If the Program
301
- specifies a version number of this License which applies to it and "any
302
- later version", you have the option of following the terms and conditions
303
- either of that version or of any later version published by the Free
304
- Software Foundation. If the Program does not specify a version number of
305
- this License, you may choose any version ever published by the Free Software
306
- Foundation.
307
-
308
- 10. If you wish to incorporate parts of the Program into other free
309
- programs whose distribution conditions are different, write to the author
310
- to ask for permission. For software which is copyrighted by the Free
311
- Software Foundation, write to the Free Software Foundation; we sometimes
312
- make exceptions for this. Our decision will be guided by the two goals
313
- of preserving the free status of all derivatives of our free software and
314
- of promoting the sharing and reuse of software generally.
315
-
316
- NO WARRANTY
317
-
318
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
319
- FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
320
- OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
321
- PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
322
- OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
323
- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
324
- TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
325
- PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
326
- REPAIR OR CORRECTION.
327
-
328
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
329
- WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
330
- REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
331
- INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
332
- OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
333
- TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
334
- YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
335
- PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
336
- POSSIBILITY OF SUCH DAMAGES.
337
-
338
- END OF TERMS AND CONDITIONS
339
-
340
- How to Apply These Terms to Your New Programs
341
-
342
- If you develop a new program, and you want it to be of the greatest
343
- possible use to the public, the best way to achieve this is to make it
344
- free software which everyone can redistribute and change under these terms.
345
-
346
- To do so, attach the following notices to the program. It is safest
347
- to attach them to the start of each source file to most effectively
348
- convey the exclusion of warranty; and each file should have at least
349
- the "copyright" line and a pointer to where the full notice is found.
350
-
351
- A ruby on rails engine which provides a very basic web application to use with other ruby on rails applications
352
- Copyright (C) 2013 Yellowen Inc
353
-
354
- This program is free software; you can redistribute it and/or modify
355
- it under the terms of the GNU General Public License as published by
356
- the Free Software Foundation; either version 2 of the License, or
357
- (at your option) any later version.
358
-
359
- This program is distributed in the hope that it will be useful,
360
- but WITHOUT ANY WARRANTY; without even the implied warranty of
361
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
362
- GNU General Public License for more details.
363
-
364
- You should have received a copy of the GNU General Public License along
365
- with this program; if not, write to the Free Software Foundation, Inc.,
366
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
367
-
368
- Also add information on how to contact you by electronic and paper mail.
369
-
370
- If the program is interactive, make it output a short notice like this
371
- when it starts in an interactive mode:
372
-
373
- Gnomovision version 69, Copyright (C) year name of author
374
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
375
- This is free software, and you are welcome to redistribute it
376
- under certain conditions; type `show c' for details.
377
-
378
- The hypothetical commands `show w' and `show c' should show the appropriate
379
- parts of the General Public License. Of course, the commands you use may
380
- be called something other than `show w' and `show c'; they could even be
381
- mouse-clicks or menu items--whatever suits your program.
382
-
383
- You should also get your employer (if you work as a programmer) or your
384
- school, if any, to sign a "copyright disclaimer" for the program, if
385
- necessary. Here is a sample; alter the names:
386
-
387
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
388
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
389
-
390
- {signature of Ty Coon}, 1 April 1989
391
- Ty Coon, President of Vice
392
-
393
- This General Public License does not permit incorporating your program into
394
- proprietary programs. If your program is a subroutine library, you may
395
- consider it more useful to permit linking proprietary applications with the
396
- library. If this is what you want to do, use the GNU Lesser General
397
- Public License instead of this License.
398
- CODE
399
- end
400
- create_file ".gitignore" do
401
- %Q{
402
- .bundle/
403
- log/*.log
404
- *~
405
- pkg/
406
- test/dummy/db/*.sqlite3
407
- test/dummy/db/*.sqlite3-journal
408
- test/dummy/log/*.log
409
- test/dummy/tmp/
410
- test/dummy/.sass-cache
411
- spec/dummy/db/*.sqlite3
412
- spec/dummy/db/*.sqlite3-journal
413
- spec/dummy/log/*.log
414
- spec/dummy/tmp/
415
- spec/dummy/.sass-cache
416
-
417
- *.rbc
418
- *.sassc
419
- .sass-cache
420
- capybara-*.html
421
- .rspec
422
- .rvmrc
423
- /.bundle
424
- /vendor/bundle
425
- /log/*
426
- /tmp/*
427
- /db/*.sqlite3
428
- /public/system/*
429
- /coverage/
430
- /spec/tmp/*
431
- **.orig
432
- rerun.txt
433
- pickle-email-*.html
434
- .project
435
- config/initializers/secret_token.rb
436
- .*\#*#
437
- \#*#
438
- docs/*
439
- node_modules/
440
- .development
441
- doc/
442
- }
443
- end
444
-
445
- git add: "."
446
- git commit: %Q{-a -m "Initial commit"}