Skip to content

Commit a48fcc7

Browse files
committed
Fix bug issue where plural project names for modules wouldn't generate correctly.
1 parent 6f30cbe commit a48fcc7

File tree

4 files changed

+29
-6
lines changed

4 files changed

+29
-6
lines changed

Gemfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
browsercms (3.5.4)
4+
browsercms (3.5.5)
55
ancestry (~> 1.2.4)
66
ckeditor_rails (~> 3.6.4)
77
jquery-rails (~> 2.0)
@@ -63,7 +63,7 @@ GEM
6363
ckeditor_rails (3.6.4.1)
6464
railties (~> 3.0)
6565
thor (~> 0.14)
66-
cocaine (0.3.0)
66+
cocaine (0.3.1)
6767
cucumber (1.2.0)
6868
builder (>= 2.1.2)
6969
diff-lcs (>= 1.1.3)
@@ -91,7 +91,7 @@ GEM
9191
hike (1.2.1)
9292
i18n (0.6.1)
9393
journey (1.0.4)
94-
jquery-rails (2.1.1)
94+
jquery-rails (2.1.3)
9595
railties (>= 3.1.0, < 5.0)
9696
thor (~> 0.14)
9797
json (1.7.5)
@@ -177,7 +177,7 @@ GEM
177177
rack (>= 1.0.0)
178178
thor (0.16.0)
179179
tilt (1.3.3)
180-
treetop (1.4.10)
180+
treetop (1.4.11)
181181
polyglot
182182
polyglot (>= 0.3.1)
183183
tzinfo (0.3.33)

lib/cms/commands/actions.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def current_project
2424

2525
# i.e. BcmsWhatever
2626
def module_class
27-
current_project.classify
27+
current_project.camelize
2828
end
2929

3030
# Runs `bundle install` inside the correct project directory (unless --skip_bundle was passed to the command)

lib/cms/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Allows the precise version of BrowserCMS to be determined programatically.
33
#
44
module Cms
5-
VERSION = "3.5.4"
5+
VERSION = "3.5.5"
66

77
# Return the current version of the CMS.
88
def self.version
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
require "test_helper"
2+
3+
require 'cms/commands/actions'
4+
5+
class MyTest < ActiveSupport::TestCase
6+
7+
def self.source_root(path)
8+
# Noop - Needed to make tests work
9+
end
10+
include Cms::Commands::Actions
11+
12+
test "#module_name with singular class name" do
13+
@project_name = "hello"
14+
15+
assert_equal "Hello", module_class
16+
end
17+
18+
test "#module_name with plural class name" do
19+
@project_name = "bcms_widgets"
20+
21+
assert_equal "BcmsWidgets", module_class
22+
end
23+
end

0 commit comments

Comments
 (0)