docent 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ # CHANGELOG
2
+
3
+ ## 0.0.2
4
+
5
+ ### Enhancements
6
+
7
+ - Add generator to simplify installation; use `rails generate docent:install` to mount engine, create initializer file, and copy migrations.
8
+
9
+ ### Bug fixes
10
+
11
+ - Remove and ignore `Gemfile.lock` from gem to follow best practice.
12
+
13
+ ## 0.0.1
14
+
15
+ - Initial release.
data/README.markdown CHANGED
@@ -6,26 +6,23 @@ Docent is a proof-of-concept, based on something I baked into a Rails 2-point-so
6
6
 
7
7
  ## Setup
8
8
 
9
- 1. Add Docent to your Gemfile and install with Bundler.
9
+ 1. Add Docent to your Gemfile and install with Bundler:
10
10
 
11
- 2. Mount the engine in your application:
11
+ gem 'docent'
12
12
 
13
- mount Docent::Engine => "/docent"
13
+ 2. Run the Docent generator to mount the app in your routes file, generate an initializer, and copy Docent's migrations to your application:
14
14
 
15
- 3. Add the Docent-specific tables to your database:
15
+ rails generate docent:install
16
16
 
17
- rake docent:install:migrations
18
- rake db:migrate
17
+ 3. Run database migrations to add Docent-related data to your database:
19
18
 
20
- 4. Create an initializer in `config/initializers/docent.rb`. This establishes a default link (top level of your knowledge base, support form, whatever) for views without support documents in Docent; it also provides a username and password for authentication via HTTP Basic:
19
+ rake db:migrate
21
20
 
22
- Docent.default_link = 'http://yourhelpsite.com/docs'
23
- Docent.username = 'docent_admin'
24
- Docent.password = 'secret'
21
+ 4. Edit `config/initializers/docent.rb` to establish a default link (top level of your knowledge base, support form, whatever) for views without support documents in Docent; and to provide a username and password for authentication via HTTP Basic.
25
22
 
26
23
  ## Usage
27
24
 
28
- 1. Load Docent's admin panel at `http://yourapp.com/docent`
25
+ 1. Load Docent's admin panel at `http://yourapp.com/docent` and sign in with the credentials you assigned in the initializer.
29
26
 
30
27
  2. Enter links to support documents. You can enter links specific to a controller#action combination, as well as catch-all links to controllers. Docent looks for links in the following order:
31
28
 
@@ -43,7 +40,6 @@ Docent is a proof-of-concept, based on something I baked into a Rails 2-point-so
43
40
 
44
41
  ## To Do
45
42
 
46
- - add a generator to do most of the setup automatically
47
43
  - replace HTTP basic authentication with something integrated with the host application
48
44
  - add support for self-hosted documents (I'd link to be able to post documents directly from ScreenSteps into Docent via XMLRPC, for example).
49
45
 
@@ -51,7 +47,7 @@ Docent is a proof-of-concept, based on something I baked into a Rails 2-point-so
51
47
 
52
48
  I'd love to see your ideas and improvements. Fork the project on GitHub, make your changes (with specs!), and submit a pull request. **A note on specs:** I used Capybara feature specs to build Docent; the specs related to end-user access to links currently relies on a non-Rack::Test driver due to the need to check for redirection to an external site. I stuck with Selenium to minimize dependencies, at the expense of speed.
53
49
 
54
- StatBoard is released under the [MIT License][mit]. See MIT-LICENSE for further details.
50
+ Docent is released under the [MIT License][mit]. See MIT-LICENSE for further details.
55
51
 
56
52
  [mit]: http://www.opensource.org/licenses/MIT
57
53
 
@@ -1,3 +1,3 @@
1
1
  module Docent
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -0,0 +1,5 @@
1
+ Description:
2
+ Create Docent initializer and copy Docent-related migrations
3
+
4
+ Example:
5
+ rails generate docent:install
@@ -0,0 +1,26 @@
1
+ module Docent
2
+ class InstallGenerator < Rails::Generators::Base
3
+ source_root File.expand_path('../templates', __FILE__)
4
+
5
+ def mount_engine_in_routes_file
6
+ inject_into_file "config/routes.rb", after: "Rails.application.routes.draw do\n" do <<-'ROUTE'
7
+
8
+ mount Docent::Engine => "/docent"
9
+
10
+ ROUTE
11
+ end
12
+ end
13
+
14
+ def generate_initializer
15
+ copy_file "initializer.rb", "config/initializers/docent.rb"
16
+ end
17
+
18
+ def copy_migrations
19
+ rake "docent:install:migrations"
20
+ end
21
+
22
+ def wrapup
23
+ puts "All done! Now run rake db:migrate to add Docent's tables to your app and edit config/initializers/docent.rb to finish."
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,6 @@
1
+ # Replace with the root link to your documentation site
2
+ Docent.default_link = 'http://yourhelpsite.com/docs'
3
+
4
+ # Replace with HTTP Basic authentication credentials
5
+ Docent.username = 'docent_admin'
6
+ Docent.password = 'secret'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-26 00:00:00.000000000 Z
12
+ date: 2012-12-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -43,22 +43,6 @@ dependencies:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
45
  version: '0'
46
- - !ruby/object:Gem::Dependency
47
- name: sqlite3
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ! '>='
52
- - !ruby/object:Gem::Version
53
- version: '0'
54
- type: :development
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
46
  - !ruby/object:Gem::Dependency
63
47
  name: rspec-rails
64
48
  requirement: !ruby/object:Gem::Requirement
@@ -148,10 +132,14 @@ files:
148
132
  - lib/docent/engine.rb
149
133
  - lib/docent/version.rb
150
134
  - lib/docent.rb
135
+ - lib/generators/docent/install/install_generator.rb
136
+ - lib/generators/docent/install/templates/initializer.rb
137
+ - lib/generators/docent/install/USAGE
151
138
  - lib/tasks/docent_tasks.rake
152
139
  - MIT-LICENSE
153
140
  - Rakefile
154
141
  - README.markdown
142
+ - CHANGELOG.markdown
155
143
  homepage: https://github.com/ruralocity/docent
156
144
  licenses:
157
145
  - MIT
@@ -167,7 +155,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
167
155
  version: '0'
168
156
  segments:
169
157
  - 0
170
- hash: 3064965182523156662
158
+ hash: 1558384049432058431
171
159
  required_rubygems_version: !ruby/object:Gem::Requirement
172
160
  none: false
173
161
  requirements:
@@ -176,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
176
164
  version: '0'
177
165
  segments:
178
166
  - 0
179
- hash: 3064965182523156662
167
+ hash: 1558384049432058431
180
168
  requirements: []
181
169
  rubyforge_project:
182
170
  rubygems_version: 1.8.23