laravel 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +5 -0
- data/bin/laravel +10 -0
- data/features/S_1_new.feature +7 -3
- data/features/S_4_install_bundles.feature +20 -0
- data/features/step_definitions/laravel.rb +5 -4
- data/lib/laravel/version.rb +1 -1
- metadata +9 -1
data/.travis.yml
CHANGED
data/bin/laravel
CHANGED
@@ -31,6 +31,7 @@ module Laravel
|
|
31
31
|
# --index => update Application Index for newly created application
|
32
32
|
# --key => generate a new key for this application
|
33
33
|
# --no_perms => do not update permissions on storage/ directory
|
34
|
+
# --bundles => comma-separated list of bundles to install
|
34
35
|
desc "new [MY_APP]", "create a new Laravel application"
|
35
36
|
method_option :local, :type => :string, :aliases => "-l", :banner => "DIRECTORY",
|
36
37
|
:desc => "use laravel source from a local directory"
|
@@ -41,6 +42,8 @@ module Laravel
|
|
41
42
|
:desc => "change the Application Index"
|
42
43
|
method_option :key, :type => :boolean, :aliases => "-k",
|
43
44
|
:desc => "generate a new key for this application"
|
45
|
+
method_option :bundles,:type => :string, :aliases => "-b",
|
46
|
+
:desc => "comma-separated list of bundles to install"
|
44
47
|
method_option :no_perms, :type => :boolean, :desc => "do not update permissions on storage/ directory"
|
45
48
|
def new(app_name)
|
46
49
|
Laravel::Create::source app_name, options
|
@@ -62,6 +65,13 @@ module Laravel
|
|
62
65
|
Laravel::Manage::generate_key options[:app]
|
63
66
|
end
|
64
67
|
|
68
|
+
desc "install_bundles", "comma-separated list of bundles to install"
|
69
|
+
method_option :app, :type => :string, :aliases => "-a",
|
70
|
+
:desc => "use the specified Laravel application instead of current directory"
|
71
|
+
def install_bundles
|
72
|
+
Laravel::Manage::install_bundles options[:app]
|
73
|
+
end
|
74
|
+
|
65
75
|
# choose a default task to run
|
66
76
|
default_task :info
|
67
77
|
|
data/features/S_1_new.feature
CHANGED
@@ -47,12 +47,16 @@ Feature: Create a new application based on Laravel framework for PHP
|
|
47
47
|
When I run `laravel new my_app --no_perms`
|
48
48
|
Then the stdout should contain "Hurray!"
|
49
49
|
And laravel application must exist in "my_app" directory
|
50
|
-
And permissions should not be updated on "storage" directory
|
50
|
+
And permissions should not be updated on "my_app/storage" directory
|
51
51
|
|
52
|
-
@may_require_repository_download
|
52
|
+
@may_require_repository_download @focus @announce
|
53
53
|
Scenario: create Laravel application with maximum customizations
|
54
|
-
When I run `laravel new -ki '' -r http://github.com/laravel/pastes my_app --force`
|
54
|
+
When I run `laravel new -ki '' -b=bob,anbu -r http://github.com/laravel/pastes my_app --force`
|
55
55
|
Then laravel application should be ready to use in "my_app" directory
|
56
|
+
And "bob" bundle must be installed for "my_app" application
|
57
|
+
And "anbu" bundle must be installed for "my_app" application
|
56
58
|
And the stdout should contain "Creating application forcefully"
|
57
59
|
And the stdout should contain "Generated a new key"
|
58
60
|
And the stdout should contain "Changed Application Index"
|
61
|
+
And the stdout should contain "Installed bundle: Bob"
|
62
|
+
And the stdout should contain "Installed bundle: Anbu"
|
@@ -0,0 +1,20 @@
|
|
1
|
+
Feature: Install bundles for Laravel application
|
2
|
+
In order to extend the functionality of my Laravel application
|
3
|
+
As a PHP developer acquinted with ruby
|
4
|
+
I want to use Laravel gem to install Laravel bundles for me
|
5
|
+
|
6
|
+
@may_require_repository_download @focus @announce
|
7
|
+
Scenario: install a new bundle for a Laravel application
|
8
|
+
Given laravel application exists in "my_app" directory
|
9
|
+
And "bob" bundle must not be installed for "my_app" application
|
10
|
+
When I run `laravel install_bundles "bob" --app=my_app`
|
11
|
+
Then the stdout should contain "Installed bundle: Bob"
|
12
|
+
And "bob" bundle must be installed for "my_app" application
|
13
|
+
|
14
|
+
@may_require_repository_download @focus @announce
|
15
|
+
Scenario: create Laravel application with some bundles
|
16
|
+
When I run `laravel new my_app --bundles=bob,bootstrapper,anbu`
|
17
|
+
Then laravel application should be ready to use in "my_app" directory
|
18
|
+
And "bob" bundle must be installed for "my_app" application
|
19
|
+
And "bootstrapper" bundle must be installed for "my_app" application
|
20
|
+
And "anbu" bundle must be installed for "my_app" application
|
@@ -38,7 +38,7 @@ Then /^laravel application should be ready to use in "(.*?)" directory$/ do |dir
|
|
38
38
|
step "local cache for \"official\" repository should exist"
|
39
39
|
step "the stdout should contain \"Hurray!\""
|
40
40
|
step "laravel application must exist in \"#{dir}\" directory"
|
41
|
-
step "permissions should be updated on \"storage\" directory"
|
41
|
+
step "permissions should be updated on \"#{dir}/storage\" directory"
|
42
42
|
end
|
43
43
|
|
44
44
|
# check if we have a running Laravel instance using 'non-official' repository
|
@@ -46,7 +46,7 @@ Then /^laravel application should be ready to use in "(.*?)" directory using "(.
|
|
46
46
|
step "local cache for \"#{repo}\" repository should exist"
|
47
47
|
step "the stdout should contain \"Hurray!\""
|
48
48
|
step "laravel application must exist in \"#{dir}\" directory"
|
49
|
-
step "permissions should be updated on \"storage\" directory"
|
49
|
+
step "permissions should be updated on \"#{dir}/storage\" directory"
|
50
50
|
end
|
51
51
|
|
52
52
|
# check if local cache exists
|
@@ -63,8 +63,9 @@ end
|
|
63
63
|
|
64
64
|
# check if valid permissions were set on the "storage/" directory
|
65
65
|
Then /^permissions should( not)? be updated on "(.*?)" directory$/ do |negation, dir|
|
66
|
-
dir =
|
67
|
-
|
66
|
+
dir = get_relative_path_to_test_directory(dir)
|
67
|
+
world_bit = sprintf("%o", File.stat(dir).mode).to_s[-1,1].to_i
|
68
|
+
is_world_writable = [2,3,6,7].include?(world_bit)
|
68
69
|
raise_error_based_on_condition(is_world_writable, negation)
|
69
70
|
end
|
70
71
|
|
data/lib/laravel/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: laravel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -77,6 +77,7 @@ files:
|
|
77
77
|
- features/S_1_new.feature
|
78
78
|
- features/S_2_generate_key.feature
|
79
79
|
- features/S_3_update_index.feature
|
80
|
+
- features/S_4_install_bundles.feature
|
80
81
|
- features/step_definitions/laravel.rb
|
81
82
|
- features/support/env.rb
|
82
83
|
- features/support/laravel_helpers.rb
|
@@ -100,12 +101,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
100
101
|
- - ! '>='
|
101
102
|
- !ruby/object:Gem::Version
|
102
103
|
version: '0'
|
104
|
+
segments:
|
105
|
+
- 0
|
106
|
+
hash: -4483550955882994531
|
103
107
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
104
108
|
none: false
|
105
109
|
requirements:
|
106
110
|
- - ! '>='
|
107
111
|
- !ruby/object:Gem::Version
|
108
112
|
version: '0'
|
113
|
+
segments:
|
114
|
+
- 0
|
115
|
+
hash: -4483550955882994531
|
109
116
|
requirements: []
|
110
117
|
rubyforge_project:
|
111
118
|
rubygems_version: 1.8.24
|
@@ -118,6 +125,7 @@ test_files:
|
|
118
125
|
- features/S_1_new.feature
|
119
126
|
- features/S_2_generate_key.feature
|
120
127
|
- features/S_3_update_index.feature
|
128
|
+
- features/S_4_install_bundles.feature
|
121
129
|
- features/step_definitions/laravel.rb
|
122
130
|
- features/support/env.rb
|
123
131
|
- features/support/laravel_helpers.rb
|