active_admin_bbs 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e66deb2ce489a1bdb497ca8523bd2eb1fad635ea
4
+ data.tar.gz: 71adf616ae0af03f8f0ef2c3e173702d08b4585f
5
+ SHA512:
6
+ metadata.gz: 8f011cec3a990bfe4bcc498260edaa87eba172bc571c02b407a1bd40a2f34ec3b61daba463533cd220cf8a763f49f7456ca4209a6a4f7cf2fb9e4939dbd95dac
7
+ data.tar.gz: 20622f279fdff113f5f5467e192506f5f034a7d1b651171a8d1f0125389919c509d8ce048463e0b1f92e2d197bc68a79a7a9f8e8c6642cae08aadf53c8ff9ce0
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2016 kajisha
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # ActiveAdminBbs
2
+ Short description and motivation.
3
+
4
+ ## Usage
5
+ How to use my plugin.
6
+
7
+ ## Installation
8
+ Add this line to your application's Gemfile:
9
+
10
+ ```ruby
11
+ gem 'active_admin_bbs'
12
+ ```
13
+
14
+ And then execute:
15
+ ```bash
16
+ $ bundle
17
+ ```
18
+
19
+ Or install it yourself as:
20
+ ```bash
21
+ $ gem install active_admin_bbs
22
+ ```
23
+
24
+ ## Contributing
25
+ Contribution directions go here.
26
+
27
+ ## License
28
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,34 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'ActiveAdminBbs'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.md')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+
18
+
19
+
20
+
21
+
22
+ require 'bundler/gem_tasks'
23
+
24
+ require 'rake/testtask'
25
+
26
+ Rake::TestTask.new(:test) do |t|
27
+ t.libs << 'lib'
28
+ t.libs << 'test'
29
+ t.pattern = 'test/**/*_test.rb'
30
+ t.verbose = false
31
+ end
32
+
33
+
34
+ task default: :test
@@ -0,0 +1,15 @@
1
+ ActiveAdmin.register Bbs::Category do
2
+ form as: 'bbs_category' do |f|
3
+ f.semantic_errors
4
+ f.inputs
5
+ f.actions
6
+ end
7
+
8
+ controller do
9
+ private
10
+
11
+ def permitted_params
12
+ params.permit bbs_category: [:name]
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,19 @@
1
+ ActiveAdmin.register Bbs::Comment do
2
+ form as: 'bbs_comment' do |f|
3
+ f.semantic_errors
4
+ f.inputs
5
+ f.actions
6
+ end
7
+
8
+ filter :id
9
+ filter :title
10
+ filter :body
11
+
12
+ controller do
13
+ private
14
+
15
+ def permitted_params
16
+ params.permit bbs_comment: [:title, :body]
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ ActiveAdmin.register Bbs::Topic do
2
+ form as: 'bbs_topic' do |f|
3
+ f.semantic_errors
4
+ f.inputs
5
+ f.actions
6
+ end
7
+
8
+ filter :id
9
+ filter :title
10
+ filter :body
11
+
12
+ controller do
13
+ private
14
+
15
+ def permitted_params
16
+ params.permit bbs_topic: [:title, :body]
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,24 @@
1
+ ActiveAdmin.register Bbs::User do
2
+ form as: 'bbs_user' do |f|
3
+ f.semantic_errors
4
+
5
+ f.input :email
6
+
7
+ f.inputs do
8
+ f.has_many :profile, new_record: false do |p|
9
+ p.input :avatar_url
10
+ p.input :nickname
11
+ end
12
+ end
13
+
14
+ f.actions
15
+ end
16
+
17
+ controller do
18
+ private
19
+
20
+ def permitted_params
21
+ params.permit bbs_user: [:email, profile_attributes: [:avatar_url, :nickname]]
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,3 @@
1
+ module ActiveAdminBbs
2
+ VERSION = '0.1.0'
3
+ end
@@ -0,0 +1,5 @@
1
+ require 'active_admin_bbs/version'
2
+ require 'rails/active_admin_bbs/railtie'
3
+
4
+ module ActiveAdminBbs
5
+ end
@@ -0,0 +1,9 @@
1
+ module ActiveAdminBbs
2
+ class Railtie < ::Rails::Railtie
3
+ initializer 'active_admin_bbs' do
4
+ ActiveSupport.on_load(:bbs_engine) do
5
+ ActiveAdmin.application.load_paths << File.expand_path('../../../../app/admin', __FILE__)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :active_admin_bbs do
3
+ # # Task goes here
4
+ # end
metadata ADDED
@@ -0,0 +1,131 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: active_admin_bbs
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - ''
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-09-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 5.0.0
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 5.0.0.1
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: 5.0.0
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 5.0.0.1
33
+ - !ruby/object:Gem::Dependency
34
+ name: bbs
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: activeadmin
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ - !ruby/object:Gem::Dependency
62
+ name: inherited_resources
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ type: :runtime
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ - !ruby/object:Gem::Dependency
76
+ name: pg
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ description: ''
90
+ email:
91
+ - jp.bm-sms.developers@bm-sms.jp
92
+ executables: []
93
+ extensions: []
94
+ extra_rdoc_files: []
95
+ files:
96
+ - MIT-LICENSE
97
+ - README.md
98
+ - Rakefile
99
+ - app/admin/bbs_category.rb
100
+ - app/admin/bbs_comment.rb
101
+ - app/admin/bbs_topic.rb
102
+ - app/admin/bbs_user.rb
103
+ - lib/active_admin_bbs.rb
104
+ - lib/active_admin_bbs/version.rb
105
+ - lib/rails/active_admin_bbs/railtie.rb
106
+ - lib/tasks/active_admin_bbs_tasks.rake
107
+ homepage: ''
108
+ licenses:
109
+ - MIT
110
+ metadata: {}
111
+ post_install_message:
112
+ rdoc_options: []
113
+ require_paths:
114
+ - lib
115
+ required_ruby_version: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ version: '0'
120
+ required_rubygems_version: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ requirements: []
126
+ rubyforge_project:
127
+ rubygems_version: 2.5.1
128
+ signing_key:
129
+ specification_version: 4
130
+ summary: ''
131
+ test_files: []