behavior 0.1.0 → 0.1.1
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.
- data/README.md +102 -0
- data/Rakefile +1 -1
- data/app/views/admin/configs/show.html.erb +0 -6
- data/app/views/layouts/admin.html.erb +6 -0
- data/behavior.gemspec +2 -5
- data/spec/debug.log +92 -0
- metadata +4 -4
- data/README.textile +0 -97
data/README.md
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
Behavior
|
2
|
+
========
|
3
|
+
|
4
|
+
Behavior is a Ruby on Rails plugin for storing application configuration variables in the database. You can use it to store things like a Site's Title, description and keywords, or for user definable things like a currency exchange rate, or minimum and maximum values.
|
5
|
+
|
6
|
+
The benefits of storing configuration in the database are:
|
7
|
+
|
8
|
+
- End users can easily edit the values
|
9
|
+
- Configuration is decoupled from the codebase
|
10
|
+
|
11
|
+
This is particularly useful for open source projects, where application settings shouldn't be stored in source code.
|
12
|
+
|
13
|
+
It's designed to be simple to use and get up and running, and to be flexible in that it's both end user and developer friendly.
|
14
|
+
|
15
|
+
Although all config variables are ultimately stored in the database, you can set sensible defaults in a configuration file.
|
16
|
+
|
17
|
+
Installation
|
18
|
+
============
|
19
|
+
|
20
|
+
Behavior is easy to install.
|
21
|
+
|
22
|
+
As a plugin:
|
23
|
+
|
24
|
+
./script/plugin install git://github.com/paulca/behavior.git
|
25
|
+
|
26
|
+
Or as a gem. Add this to your environment.rb:
|
27
|
+
|
28
|
+
config.gem 'behavior'
|
29
|
+
|
30
|
+
Then generate the migration and sample behavior.yml:
|
31
|
+
|
32
|
+
./script/generate behavior
|
33
|
+
|
34
|
+
And run the migration:
|
35
|
+
|
36
|
+
rake db:migrate
|
37
|
+
|
38
|
+
Basic Usage
|
39
|
+
===========
|
40
|
+
|
41
|
+
There are two parts to how behavior works. First of all there is a config file, `config/behavior.yml`. This file controls the variables that are allowed to be set in the app.
|
42
|
+
|
43
|
+
For example, if you wanted to have access to a config variable "site_title", put this in behavior.yml:
|
44
|
+
|
45
|
+
site_title:
|
46
|
+
default:
|
47
|
+
|
48
|
+
Now, within your app controllers and views, you can access `config[:site_title]`. In your models, you can access `Behavior.config[:site_title]`.
|
49
|
+
|
50
|
+
If you want to update the config, call `config.update(:site_title => "My New Title")`
|
51
|
+
|
52
|
+
Web Interface
|
53
|
+
=============
|
54
|
+
|
55
|
+
Using Rails' Engines feature, behavior comes with a web interface that is available to your app straight away at `http://localhost:3000/admin/config`.
|
56
|
+
|
57
|
+
By default, this comes with no styling, but you can create a layout in `app/layouts/admin.html.erb`, or set a layout by setting `Behavior::Setting.layout`
|
58
|
+
|
59
|
+
For example, to use your standard application layout, create a `config/initializers/behavior.rb` like this:
|
60
|
+
|
61
|
+
Behavior::Settings.layout = 'application'
|
62
|
+
|
63
|
+
You can also add before_filters to protect the controller from outsiders:
|
64
|
+
|
65
|
+
Behavior::Settings.before_filters << 'require_admin_user'
|
66
|
+
|
67
|
+
If you want to control how the fields in the admin interface appear, you can add additional params in your behavior.yml file:
|
68
|
+
|
69
|
+
site_title:
|
70
|
+
name: Name of Your Site # sets the edit label
|
71
|
+
default: My Site # sets the default value
|
72
|
+
type: string # uses input type="text"
|
73
|
+
|
74
|
+
site_description:
|
75
|
+
name: Describe Your Site # sets the edit label
|
76
|
+
default: My Site # sets the default value
|
77
|
+
type: text # uses textarea
|
78
|
+
|
79
|
+
secret:
|
80
|
+
name: A Secret Passphrase # sets the edit label
|
81
|
+
default: passpass # sets the default value
|
82
|
+
type: password # uses input type="password"
|
83
|
+
|
84
|
+
Running the tests
|
85
|
+
=================
|
86
|
+
|
87
|
+
You can run the tests by checking out the code into vendor/plugins of a Rails app and running:
|
88
|
+
|
89
|
+
rake
|
90
|
+
|
91
|
+
It also comes with a set of cucumber features:
|
92
|
+
|
93
|
+
cucumber
|
94
|
+
|
95
|
+
About me
|
96
|
+
========
|
97
|
+
|
98
|
+
I'm Paul Campbell. I'm an avid Ruby on Rails web developer. Follow my ramblings at [http://www.pabcas.com](http://www.pabcas.com)
|
99
|
+
|
100
|
+
Follow me on Twitter [http://twitter.com/paulca](http://twitter.com/paulca)
|
101
|
+
|
102
|
+
Copyright (c) 2009 Paul Campbell, released under the MIT license
|
data/Rakefile
CHANGED
data/behavior.gemspec
CHANGED
@@ -5,17 +5,14 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{behavior}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Paul Campbell"]
|
12
12
|
s.date = %q{2009-12-11}
|
13
13
|
s.email = %q{paul@rslw.com}
|
14
|
-
s.extra_rdoc_files = [
|
15
|
-
"README.textile"
|
16
|
-
]
|
17
14
|
s.files = [
|
18
|
-
"README.
|
15
|
+
"README.md",
|
19
16
|
"Rakefile",
|
20
17
|
"app/controllers/admin/configs_controller.rb",
|
21
18
|
"app/helpers/behavior_helper.rb",
|
data/spec/debug.log
CHANGED
@@ -1729,3 +1729,95 @@
|
|
1729
1729
|
[4;36;1mBehaviorConfig Load (0.2ms)[0m [0;1mSELECT * FROM "behavior_configs" WHERE ("behavior_configs"."key" = 'email_name') LIMIT 1[0m
|
1730
1730
|
[4;35;1mBehaviorConfig Load (0.2ms)[0m [0mSELECT * FROM "behavior_configs" WHERE ("behavior_configs"."key" = 'password') LIMIT 1[0m
|
1731
1731
|
[4;36;1mBehaviorConfig Load (0.1ms)[0m [0;1mSELECT * FROM "behavior_configs" WHERE ("behavior_configs"."key" = 'description') LIMIT 1[0m
|
1732
|
+
[4;36;1mSQL (0.2ms)[0m [0;1mselect sqlite_version(*)[0m
|
1733
|
+
[4;35;1mSQL (0.3ms)[0m [0m SELECT name
|
1734
|
+
FROM sqlite_master
|
1735
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
1736
|
+
[0m
|
1737
|
+
[4;36;1mSQL (2.7ms)[0m [0;1mDROP TABLE "behavior_configs"[0m
|
1738
|
+
[4;35;1mSQL (1.7ms)[0m [0mCREATE TABLE "behavior_configs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "key" varchar(255), "value" varchar(255)) [0m
|
1739
|
+
[4;36;1mSQL (0.2ms)[0m [0;1m SELECT name
|
1740
|
+
FROM sqlite_master
|
1741
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
1742
|
+
[0m
|
1743
|
+
[4;35;1mSQL (0.1ms)[0m [0mSELECT version FROM "schema_migrations"[0m
|
1744
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mselect sqlite_version(*)[0m
|
1745
|
+
[4;35;1mSQL (0.3ms)[0m [0m SELECT name
|
1746
|
+
FROM sqlite_master
|
1747
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
1748
|
+
[0m
|
1749
|
+
[4;36;1mSQL (1.5ms)[0m [0;1mDROP TABLE "behavior_configs"[0m
|
1750
|
+
[4;35;1mSQL (1.4ms)[0m [0mCREATE TABLE "behavior_configs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "key" varchar(255), "value" varchar(255)) [0m
|
1751
|
+
[4;36;1mSQL (0.2ms)[0m [0;1m SELECT name
|
1752
|
+
FROM sqlite_master
|
1753
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
1754
|
+
[0m
|
1755
|
+
[4;35;1mSQL (0.1ms)[0m [0mSELECT version FROM "schema_migrations"[0m
|
1756
|
+
[4;36;1mBehaviorConfig Load (0.2ms)[0m [0;1mSELECT * FROM "behavior_configs" WHERE ("behavior_configs"."key" = 'email_name') LIMIT 1[0m
|
1757
|
+
[4;35;1mBehaviorConfig Load (0.1ms)[0m [0mSELECT * FROM "behavior_configs" WHERE ("behavior_configs"."key" = 'email_address') LIMIT 1[0m
|
1758
|
+
[4;36;1mBehaviorConfig Load (0.1ms)[0m [0;1mSELECT * FROM "behavior_configs" WHERE ("behavior_configs"."key" = 'description') LIMIT 1[0m
|
1759
|
+
[4;35;1mBehaviorConfig Load (0.1ms)[0m [0mSELECT * FROM "behavior_configs" WHERE ("behavior_configs"."key" = 'password') LIMIT 1[0m
|
1760
|
+
[4;36;1mBehaviorConfig Load (0.2ms)[0m [0;1mSELECT * FROM "behavior_configs" WHERE ("behavior_configs"."key" = 'email_name') LIMIT 1[0m
|
1761
|
+
[4;35;1mBehaviorConfig Create (2.7ms)[0m [0mINSERT INTO "behavior_configs" ("value", "key") VALUES(NULL, 'email_name')[0m
|
1762
|
+
[4;36;1mBehaviorConfig Update (0.1ms)[0m [0;1mUPDATE "behavior_configs" SET "value" = 'Site Administrator' WHERE "id" = 1[0m
|
1763
|
+
[4;35;1mBehaviorConfig Load (0.1ms)[0m [0mSELECT * FROM "behavior_configs" WHERE ("behavior_configs"."key" = 'email_address') LIMIT 1[0m
|
1764
|
+
[4;36;1mBehaviorConfig Create (0.1ms)[0m [0;1mINSERT INTO "behavior_configs" ("value", "key") VALUES(NULL, 'email_address')[0m
|
1765
|
+
[4;35;1mBehaviorConfig Update (0.1ms)[0m [0mUPDATE "behavior_configs" SET "value" = 'paul@rslw.com' WHERE "id" = 2[0m
|
1766
|
+
[4;36;1mBehaviorConfig Load (0.1ms)[0m [0;1mSELECT * FROM "behavior_configs" WHERE ("behavior_configs"."key" = 'description') LIMIT 1[0m
|
1767
|
+
[4;35;1mBehaviorConfig Create (0.1ms)[0m [0mINSERT INTO "behavior_configs" ("value", "key") VALUES(NULL, 'description')[0m
|
1768
|
+
[4;36;1mBehaviorConfig Update (0.2ms)[0m [0;1mUPDATE "behavior_configs" SET "value" = 'My Awesome Site' WHERE "id" = 3[0m
|
1769
|
+
[4;35;1mBehaviorConfig Load (0.2ms)[0m [0mSELECT * FROM "behavior_configs" WHERE ("behavior_configs"."key" = 'password') LIMIT 1[0m
|
1770
|
+
[4;36;1mBehaviorConfig Create (0.2ms)[0m [0;1mINSERT INTO "behavior_configs" ("value", "key") VALUES(NULL, 'password')[0m
|
1771
|
+
[4;35;1mBehaviorConfig Update (0.2ms)[0m [0mUPDATE "behavior_configs" SET "value" = 'password' WHERE "id" = 4[0m
|
1772
|
+
[4;36;1mBehaviorConfig Load (0.3ms)[0m [0;1mSELECT * FROM "behavior_configs" WHERE ("behavior_configs"."key" = 'email_name') LIMIT 1[0m
|
1773
|
+
[4;35;1mBehaviorConfig Load (0.1ms)[0m [0mSELECT * FROM "behavior_configs" WHERE ("behavior_configs"."key" = 'email_address') LIMIT 1[0m
|
1774
|
+
[4;36;1mBehaviorConfig Load (0.1ms)[0m [0;1mSELECT * FROM "behavior_configs" WHERE ("behavior_configs"."key" = 'description') LIMIT 1[0m
|
1775
|
+
[4;35;1mBehaviorConfig Load (0.1ms)[0m [0mSELECT * FROM "behavior_configs" WHERE ("behavior_configs"."key" = 'password') LIMIT 1[0m
|
1776
|
+
[4;36;1mSQL (0.2ms)[0m [0;1m SELECT name
|
1777
|
+
FROM sqlite_master
|
1778
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
1779
|
+
[0m
|
1780
|
+
[4;35;1mSQL (0.0ms)[0m [0mDELETE FROM "behavior_configs";[0m
|
1781
|
+
[4;36;1mSQL (0.2ms)[0m [0;1mselect sqlite_version(*)[0m
|
1782
|
+
[4;35;1mSQL (0.3ms)[0m [0m SELECT name
|
1783
|
+
FROM sqlite_master
|
1784
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
1785
|
+
[0m
|
1786
|
+
[4;36;1mSQL (1.6ms)[0m [0;1mDROP TABLE "behavior_configs"[0m
|
1787
|
+
[4;35;1mSQL (1.5ms)[0m [0mCREATE TABLE "behavior_configs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "key" varchar(255), "value" varchar(255)) [0m
|
1788
|
+
[4;36;1mSQL (0.2ms)[0m [0;1m SELECT name
|
1789
|
+
FROM sqlite_master
|
1790
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
1791
|
+
[0m
|
1792
|
+
[4;35;1mSQL (0.1ms)[0m [0mSELECT version FROM "schema_migrations"[0m
|
1793
|
+
[4;36;1mSQL (0.2ms)[0m [0;1mselect sqlite_version(*)[0m
|
1794
|
+
[4;35;1mSQL (0.3ms)[0m [0m SELECT name
|
1795
|
+
FROM sqlite_master
|
1796
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
1797
|
+
[0m
|
1798
|
+
[4;36;1mSQL (1.2ms)[0m [0;1mDROP TABLE "behavior_configs"[0m
|
1799
|
+
[4;35;1mSQL (1.4ms)[0m [0mCREATE TABLE "behavior_configs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "key" varchar(255), "value" varchar(255)) [0m
|
1800
|
+
[4;36;1mSQL (0.2ms)[0m [0;1m SELECT name
|
1801
|
+
FROM sqlite_master
|
1802
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
1803
|
+
[0m
|
1804
|
+
[4;35;1mSQL (0.1ms)[0m [0mSELECT version FROM "schema_migrations"[0m
|
1805
|
+
[4;36;1mBehaviorConfig Create (0.4ms)[0m [0;1mINSERT INTO "behavior_configs" ("value", "key") VALUES('paul@rslw.com', 'email_address')[0m
|
1806
|
+
[4;35;1mBehaviorConfig Load (0.3ms)[0m [0mSELECT * FROM "behavior_configs" WHERE ("behavior_configs"."id" = 1) [0m
|
1807
|
+
[4;36;1mBehaviorConfig Load (0.1ms)[0m [0;1mSELECT * FROM "behavior_configs" WHERE ("behavior_configs"."key" = 'email_address') LIMIT 1[0m
|
1808
|
+
[4;35;1mBehaviorConfig Update (0.1ms)[0m [0mUPDATE "behavior_configs" SET "value" = 'joe@putplace.com' WHERE "id" = 1[0m
|
1809
|
+
[4;36;1mBehaviorConfig Load (0.1ms)[0m [0;1mSELECT * FROM "behavior_configs" WHERE ("behavior_configs"."key" = 'email_address') LIMIT 1[0m
|
1810
|
+
[4;35;1mBehaviorConfig Create (0.3ms)[0m [0mINSERT INTO "behavior_configs" ("value", "key") VALUES('paul@rslw.com', 'email_address')[0m
|
1811
|
+
[4;36;1mBehaviorConfig Load (0.2ms)[0m [0;1mSELECT * FROM "behavior_configs" WHERE ("behavior_configs"."id" = 1) [0m
|
1812
|
+
[4;35;1mBehaviorConfig Create (0.3ms)[0m [0mINSERT INTO "behavior_configs" ("value", "key") VALUES('paul@rslw.com', 'email_address')[0m
|
1813
|
+
[4;36;1mBehaviorConfig Load (0.2ms)[0m [0;1mSELECT * FROM "behavior_configs" WHERE ("behavior_configs"."id" = 1) [0m
|
1814
|
+
[4;35;1mBehaviorConfig Create (0.4ms)[0m [0mINSERT INTO "behavior_configs" ("value", "key") VALUES('paul@rslw.com', 'email_address')[0m
|
1815
|
+
[4;36;1mBehaviorConfig Load (0.2ms)[0m [0;1mSELECT * FROM "behavior_configs" WHERE ("behavior_configs"."id" = 1) [0m
|
1816
|
+
[4;35;1mBehaviorConfig Create (0.3ms)[0m [0mINSERT INTO "behavior_configs" ("value", "key") VALUES('paul@rslw.com', 'email_address')[0m
|
1817
|
+
[4;36;1mBehaviorConfig Load (0.2ms)[0m [0;1mSELECT * FROM "behavior_configs" WHERE ("behavior_configs"."id" = 1) [0m
|
1818
|
+
[4;35;1mBehaviorConfig Load (0.1ms)[0m [0mSELECT * FROM "behavior_configs" WHERE ("behavior_configs"."key" = 'email_address') LIMIT 1[0m
|
1819
|
+
[4;36;1mBehaviorConfig Create (0.3ms)[0m [0;1mINSERT INTO "behavior_configs" ("value", "key") VALUES('paul@rslw.com', 'email_address')[0m
|
1820
|
+
[4;35;1mBehaviorConfig Load (0.1ms)[0m [0mSELECT * FROM "behavior_configs" WHERE ("behavior_configs"."id" = 1) [0m
|
1821
|
+
[4;36;1mBehaviorConfig Load (0.1ms)[0m [0;1mSELECT * FROM "behavior_configs" WHERE ("behavior_configs"."key" = 'email_name') LIMIT 1[0m
|
1822
|
+
[4;35;1mBehaviorConfig Load (0.1ms)[0m [0mSELECT * FROM "behavior_configs" WHERE ("behavior_configs"."key" = 'password') LIMIT 1[0m
|
1823
|
+
[4;36;1mBehaviorConfig Load (0.2ms)[0m [0;1mSELECT * FROM "behavior_configs" WHERE ("behavior_configs"."key" = 'description') LIMIT 1[0m
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: behavior
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Campbell
|
@@ -19,10 +19,10 @@ executables: []
|
|
19
19
|
|
20
20
|
extensions: []
|
21
21
|
|
22
|
-
extra_rdoc_files:
|
23
|
-
|
22
|
+
extra_rdoc_files: []
|
23
|
+
|
24
24
|
files:
|
25
|
-
- README.
|
25
|
+
- README.md
|
26
26
|
- Rakefile
|
27
27
|
- app/controllers/admin/configs_controller.rb
|
28
28
|
- app/helpers/behavior_helper.rb
|
data/README.textile
DELETED
@@ -1,97 +0,0 @@
|
|
1
|
-
h1. Behavior
|
2
|
-
|
3
|
-
Behavior is a Ruby on Rails plugin for storing application configuration variables in the database. You can use it to store things like a Site's Title, description and keywords, or for user definable things like a currency exchange rate, or minimum and maximum values.
|
4
|
-
|
5
|
-
The benefits of storing configuration in the database are:
|
6
|
-
|
7
|
-
- End users can easily edit the values
|
8
|
-
- Configuration is decoupled from the codebase
|
9
|
-
|
10
|
-
This is particularly useful for open source projects, where application settings shouldn't be stored in source code.
|
11
|
-
|
12
|
-
It's designed to be as simple to use and get up and running, and to be flexible in that it's both end user and developer friendly.
|
13
|
-
|
14
|
-
Although all config variables are ultimately stored in the database, you can set sensible defaults in a configuration file in the source code.
|
15
|
-
|
16
|
-
h2. Installation
|
17
|
-
|
18
|
-
Behavior is easy to install.
|
19
|
-
|
20
|
-
As a plugin:
|
21
|
-
|
22
|
-
<pre><code>./script/plugin install git://github.com/paulca/behavior.git</code></pre>
|
23
|
-
|
24
|
-
Or as a gem. Add this to your environment.rb:
|
25
|
-
|
26
|
-
<pre><code>config.gem 'behavior'</code></pre>
|
27
|
-
|
28
|
-
Generate the migration and sample behavior.yml:
|
29
|
-
|
30
|
-
<pre><code>./script/generate behavior</code></pre>
|
31
|
-
|
32
|
-
And run the migration:
|
33
|
-
|
34
|
-
<pre><code>rake db:migrate</code></pre>
|
35
|
-
|
36
|
-
h2. Basic Usage
|
37
|
-
|
38
|
-
There are two parts to how behavior works. First of all there is a config file, config/behavior.yml. This file controls the variables that are allowed to be set in the app.
|
39
|
-
|
40
|
-
For example, if you wanted to have access to a config variable "site_title", put this in behavior.yml:
|
41
|
-
|
42
|
-
<pre><code>site_title:
|
43
|
-
default: My Site</code></pre>
|
44
|
-
|
45
|
-
Now, within your app, you can access <pre><code>config[:site_title]</code></pre>.
|
46
|
-
|
47
|
-
If you want to update the config, call <pre><code>config.update(:site_title => "My New Title")</code></pre>
|
48
|
-
|
49
|
-
h2. Web Interface
|
50
|
-
|
51
|
-
behavior comes with a web interface that is available to your app straight away at <pre><code>http://localhost:3000/admin/config</code></pre>.
|
52
|
-
|
53
|
-
By default, this comes with no styling, but you can create a layout in <pre><code>app/layouts/admin.html.erb</code></pre>, or set a layout by setting <pre><code>Behavior::Setting.layout</code></pre>
|
54
|
-
|
55
|
-
For example, to use your standard application layout, create a <pre><code>config/initializers/behavior.rb</code></pre> like this:
|
56
|
-
|
57
|
-
<pre><code>Behavior::Settings.layout = 'application'</code></pre>
|
58
|
-
|
59
|
-
You can also add before_filters to protect the controller from outsiders:
|
60
|
-
|
61
|
-
<pre><code>Behavior::Settings.before_filters << 'require_admin_user'</code></pre>
|
62
|
-
|
63
|
-
If you want to control how the fields in the admin interface appear, you can add additional params in your behavior.yml file:
|
64
|
-
|
65
|
-
<pre><code>site_title:
|
66
|
-
name: Name of Your Site # sets the edit label
|
67
|
-
default: My Site # sets the default value
|
68
|
-
type: string # uses input type="text"
|
69
|
-
|
70
|
-
site_description:
|
71
|
-
name: Describe Your Site # sets the edit label
|
72
|
-
default: My Site # sets the default value
|
73
|
-
type: text # uses textarea
|
74
|
-
|
75
|
-
secret:
|
76
|
-
name: A Secret Passphrase # sets the edit label
|
77
|
-
default: passpass # sets the default value
|
78
|
-
type: password # uses input type="password"
|
79
|
-
</code></pre>
|
80
|
-
|
81
|
-
h2. Running the tests
|
82
|
-
|
83
|
-
You can run the tests by checking out the code into vendor/plugins of a Rails app and running:
|
84
|
-
|
85
|
-
<pre><code>rake</code></pre>
|
86
|
-
|
87
|
-
It also comes with a set of cucumber features:
|
88
|
-
|
89
|
-
<pre><code>cucumber</code></pre>
|
90
|
-
|
91
|
-
h2. About me
|
92
|
-
|
93
|
-
I'm Paul Campbell. I'm an avid Ruby on Rails web developer. Follow my ramblings at "http://www.pabcas.com":http://www.pabcas.com
|
94
|
-
|
95
|
-
Follow me on Twitter "http://twitter.com/paulca":http://twitter.com/paulca
|
96
|
-
|
97
|
-
Copyright (c) 2009 Paul Campbell, released under the MIT license
|