File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ Install packages using the new hotness in Python package management...[`pip`](ht
4747
4848# Actions
4949
50- - :install: Install a pip package - if version is provided, install that specific version
50+ - :install: Install a pip package - if version is provided, install that specific version (default)
5151- :upgrade: Upgrade a pip package - if version is provided, upgrade to that specific version
5252- :remove: Remove a pip package
5353- :user: User to run pip as, for using with virtualenv
@@ -65,26 +65,21 @@ Install packages using the new hotness in Python package management...[`pip`](ht
6565# Example
6666
6767 # install latest gunicorn into system path
68- python_pip "gunicorn" do
69- action :install
70- end
68+ python_pip "gunicorn"
7169
7270 # target a virtualenv
7371 python_pip "gunicorn" do
7472 virtualenv "/home/ubunut/my_ve"
75- action :install
7673 end
7774
7875 # install Django 1.1.4
7976 python_pip "django" do
8077 version "1.1.4"
81- action :install
8278 end
8379
8480 # use this provider with the core package resource
8581 package "django" do
8682 provider Chef::Provider::PythonPip
87- action :install
8883 end
8984
9085` python_virtualenv `
Original file line number Diff line number Diff line change 1919#
2020
2121actions :install , :upgrade , :remove , :purge
22+ default_action :install
23+
24+ # Covers 0.10.8 and earlier :default_action
25+ def initialize ( *args )
26+ super
27+ @action = :install
28+ end
2229
2330attribute :package_name , :kind_of => String , :name_attribute => true
2431attribute :version , :default => nil
You can’t perform that action at this time.
0 commit comments