foreman_packages 0.0.18 → 0.0.19

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.
@@ -1,55 +1,55 @@
1
- module ForemanPackages
2
- class PackagesController < ApplicationController
1
+
2
+ class ForemanPackages::PackagesController < ApplicationController
3
3
  # GET /packages
4
4
  # GET /packages.json
5
5
  def index
6
- @packages = ForemanPackages::Package.all.paginate(:page => params[:page])
6
+ @foreman_packages_packages = ForemanPackages::Package.all.paginate(:page => params[:page])
7
7
 
8
8
  respond_to do |format|
9
9
  format.html # index.html.erb
10
- format.json { render json: @packages }
10
+ format.json { render json: @foreman_packages_packages }
11
11
  end
12
12
  end
13
13
 
14
14
  # GET /packages/1
15
15
  # GET /packages/1.json
16
16
  def show
17
- @package = ForemanPackages::Package.find(params[:id])
17
+ @foreman_packages_package = ForemanPackages::Package.find(params[:id])
18
18
 
19
19
  respond_to do |format|
20
20
  format.html # show.html.erb
21
- format.json { render json: @package }
21
+ format.json { render json: @foreman_packages_package }
22
22
  end
23
23
  end
24
24
 
25
25
  # GET /packages/new
26
26
  # GET /packages/new.json
27
27
  def new
28
- @package = ForemanPackages::Package.new
28
+ @foreman_packages_package = ForemanPackages::Package.new
29
29
 
30
30
  respond_to do |format|
31
31
  format.html # new.html.erb
32
- format.json { render json: @package }
32
+ format.json { render json: @foreman_packages_package }
33
33
  end
34
34
  end
35
35
 
36
36
  # GET /packages/1/edit
37
37
  def edit
38
- @package = ForemanPackages::Package.find(params[:id])
38
+ @foreman_packages_package = ForemanPackages::Package.find(params[:id])
39
39
  end
40
40
 
41
41
  # POST /packages
42
42
  # POST /packages.json
43
43
  def create
44
- @package = ForemanPackages::Package.new(params[:package])
45
- @package.filename = params[:package][:filename].original_filename
44
+ @foreman_packages_package = ForemanPackages::Package.new(params[:foreman_packages_package])
45
+ @foreman_packages_package.filename = params[:foreman_packages_package][:filename].original_filename
46
46
  respond_to do |format|
47
- if @package.save
48
- format.html { redirect_to @package, notice: 'package was successfully created.' }
49
- format.json { render json: @package, status: :created, location: @package }
47
+ if @foreman_packages_package.save
48
+ format.html { redirect_to @foreman_packages_package, notice: 'foreman_packages_package was successfully created.' }
49
+ format.json { render json: @foreman_packages_package, status: :created, location: @foreman_packages_package }
50
50
  else
51
51
  format.html { render action: "new" }
52
- format.json { render json: @package.errors, status: :unprocessable_entity }
52
+ format.json { render json: @foreman_packages_package.errors, status: :unprocessable_entity }
53
53
  end
54
54
  end
55
55
  end
@@ -57,15 +57,15 @@ module ForemanPackages
57
57
  # PUT /packages/1
58
58
  # PUT /packages/1.json
59
59
  def update
60
- @package = ForemanPackages::Package.find(params[:id])
61
- @package.filename = params[:package][:filename].original_filename
60
+ @foreman_packages_package = ForemanPackages::Package.find(params[:id])
61
+ @foreman_packages_package.filename = params[:foreman_packages_package][:filename].original_filename
62
62
  respond_to do |format|
63
- if @package.update_attributes(params[:package])
64
- format.html { redirect_to @package, notice: 'package was successfully updated.' }
63
+ if @foreman_packages_package.update_attributes(params[:foreman_packages_package])
64
+ format.html { redirect_to @foreman_packages_package, notice: 'foreman_packages_package was successfully updated.' }
65
65
  format.json { head :no_content }
66
66
  else
67
67
  format.html { render action: "edit" }
68
- format.json { render json: @package.errors, status: :unprocessable_entity }
68
+ format.json { render json: @foreman_packages_package.errors, status: :unprocessable_entity }
69
69
  end
70
70
  end
71
71
  end
@@ -73,8 +73,8 @@ module ForemanPackages
73
73
  # DELETE /packages/1
74
74
  # DELETE /packages/1.json
75
75
  def destroy
76
- @package = ForemanPackages::Package.find(params[:id])
77
- @package.destroy
76
+ @foreman_packages_package = ForemanPackages::Package.find(params[:id])
77
+ @foreman_packages_package.destroy
78
78
 
79
79
  respond_to do |format|
80
80
  format.html { redirect_to packages_url }
@@ -82,4 +82,4 @@ module ForemanPackages
82
82
  end
83
83
  end
84
84
  end
85
- end
85
+
@@ -1,6 +1,6 @@
1
1
  # coding: utf-8
2
- module ForemanPackages
3
- class AttachmentUploader < CarrierWave::Uploader::Base
2
+
3
+ class ForemanPackages::AttachmentUploader < CarrierWave::Uploader::Base
4
4
  storage :file
5
5
 
6
6
  def store_dir
@@ -13,4 +13,3 @@ module ForemanPackages
13
13
  # "#{model.uploader_secure_token}.#{file.extension.downcase}"
14
14
  # end
15
15
  end
16
- end
@@ -1,7 +1,7 @@
1
- <%= javascript 'packages', 'package_edit', 'package_edit_interfaces', 'class_edit', 'compute_resource', 'lookup_keys'%>
1
+ <%= javascript 'foreman_packages_packages', 'foreman_packages_package_edit', 'foreman_packages_package_edit_interfaces', 'class_edit', 'compute_resource', 'lookup_keys'%>
2
2
 
3
- <%= form_for @package, :html => {:data => {:id => @package.try(:id), :submit => 'progress_bar'}} do |f| %>
4
- <%= base_errors_for @package %>
3
+ <%= form_for @foreman_packages_package, :html => {:data => {:id => @foreman_packages_package.try(:id), :submit => 'progress_bar'}} do |f| %>
4
+ <%= base_errors_for @foreman_packages_package %>
5
5
  <div class="row clearfix">
6
6
  <div class="row">
7
7
  <div class="form-group col-md-6">
@@ -23,28 +23,28 @@
23
23
  </tr>
24
24
  </thead>
25
25
  <tbody>
26
- <% packages.each do |package| %>
26
+ <% foreman_packages_packages.each do |foreman_packages_package| %>
27
27
  <tr>
28
- <td class=''><%= package.packagename %></td>
29
- <td class="hidden-xs"><%= package.ensure %></td>
30
- <td class="hidden-xs"><%= package.file_path %></td>
31
- <td class="hidden-tablet hidden-xs"><%= package.file_ensure %></td>
32
- <td class="hidden-tablet hidden-xs"><%= package.file_source %></td>
33
- <td class="hidden-tablet hidden-xs"><%= package.file_mode %></td>
34
- <td class="hidden-tablet hidden-xs"><%= package.file_onwer %></td>
35
- <td class="hidden-tablet hidden-xs"><%= package.file_group %></td>
36
- <td class="hidden-tablet hidden-xs"><%= package.file_notify %></td>
37
- <td class="hidden-tablet hidden-xs"><%= package.file_require %></td>
28
+ <td class=''><%= foreman_packages_package.foreman_packages_packagename %></td>
29
+ <td class="hidden-xs"><%= foreman_packages_package.ensure %></td>
30
+ <td class="hidden-xs"><%= foreman_packages_package.file_path %></td>
31
+ <td class="hidden-tablet hidden-xs"><%= foreman_packages_package.file_ensure %></td>
32
+ <td class="hidden-tablet hidden-xs"><%= foreman_packages_package.file_source %></td>
33
+ <td class="hidden-tablet hidden-xs"><%= foreman_packages_package.file_mode %></td>
34
+ <td class="hidden-tablet hidden-xs"><%= foreman_packages_package.file_onwer %></td>
35
+ <td class="hidden-tablet hidden-xs"><%= foreman_packages_package.file_group %></td>
36
+ <td class="hidden-tablet hidden-xs"><%= foreman_packages_package.file_notify %></td>
37
+ <td class="hidden-tablet hidden-xs"><%= foreman_packages_package.file_require %></td>
38
38
 
39
- <td class="hidden-tablet hidden-xs"><%= package.service_name %></td>
40
- <td class="hidden-tablet hidden-xs"><%= package.service_ensure %></td>
41
- <td class="hidden-tablet hidden-xs"><%= package.service_enable %></td>
42
- <td class="hidden-tablet hidden-xs"><%= package.service_hasstatus %></td>
43
- <td class="hidden-tablet hidden-xs"><%= package.service_hasrestart %></td>
39
+ <td class="hidden-tablet hidden-xs"><%= foreman_packages_package.service_name %></td>
40
+ <td class="hidden-tablet hidden-xs"><%= foreman_packages_package.service_ensure %></td>
41
+ <td class="hidden-tablet hidden-xs"><%= foreman_packages_package.service_enable %></td>
42
+ <td class="hidden-tablet hidden-xs"><%= foreman_packages_package.service_hasstatus %></td>
43
+ <td class="hidden-tablet hidden-xs"><%= foreman_packages_package.service_hasrestart %></td>
44
44
  <td>
45
- <%= link_to '查看', package %>
46
- <%= link_to '编辑', edit_package_path(package) %>
47
- <%= link_to '删除', package, method: :delete, data: { confirm: 'Are you sure?' } %>
45
+ <%= link_to '查看', foreman_packages_package %>
46
+ <%= link_to '编辑', edit_foreman_packages_package_path(foreman_packages_package) %>
47
+ <%= link_to '删除', foreman_packages_package, method: :delete, data: { confirm: 'Are you sure?' } %>
48
48
  </td>
49
49
  </tr>
50
50
  <% end %>
@@ -66,4 +66,4 @@
66
66
  </div><!-- /.modal-content -->
67
67
  </div><!-- /.modal-dialog -->
68
68
  </div><!-- /.modal -->
69
- <%= will_paginate_with_info packages, :more => " - "+_("<b class='select_count'>0</b> selected") %>
69
+ <%= will_paginate_with_info foreman_packages_packages, :more => " - "+_("<b class='select_count'>0</b> selected") %>
@@ -1,5 +1,5 @@
1
1
  <% if authorized? %>
2
- <% title_actions button_group(link_to "新增", new_package_path) %>
2
+ <% title_actions button_group(link_to "新增", new_foreman_packages_package_path) %>
3
3
  <% end %>
4
4
 
5
- <%= render 'list', :packages => @packages, :header => @title || _("Package") %>
5
+ <%= render 'list', :foreman_packages_packages => @foreman_packages_packages, :header => @title || _("foreman_packages_package") %>
@@ -2,9 +2,9 @@
2
2
  <div class="container">
3
3
  <div class="row">
4
4
  <h1 class="clearfix">
5
- <%#= @package.name %>
6
- <%= link_to '返回', packages_path, class: "btn btn-primary pull-right mr1" %>
7
- <%= link_to '编辑', edit_package_path(@package), class: "btn btn-warning pull-right mr1" %>
5
+ <%#= @foreman_packages_package.name %>
6
+ <%= link_to '返回', foreman_packages_packages_path, class: "btn btn-primary pull-right mr1" %>
7
+ <%= link_to '编辑', edit_foreman_packages_package_path(@foreman_packages_package), class: "btn btn-warning pull-right mr1" %>
8
8
  </h1>
9
9
  </div>
10
10
 
@@ -19,10 +19,10 @@
19
19
  <td><strong>file_ensure</strong></td>
20
20
  </tr>
21
21
  <tr>
22
- <td><%= @package.packagename %></td>
23
- <td><%= @package.ensure %></td>
24
- <td><%= @package.file_path %></td>
25
- <td><%= @package.file_ensure %></td>
22
+ <td><%= @foreman_packages_package.packagename %></td>
23
+ <td><%= @foreman_packages_package.ensure %></td>
24
+ <td><%= @foreman_packages_package.file_path %></td>
25
+ <td><%= @foreman_packages_package.file_ensure %></td>
26
26
  </tr>
27
27
 
28
28
  <tr>
@@ -32,10 +32,10 @@
32
32
  <td><strong>file_group</strong></td>
33
33
  </tr>
34
34
  <tr>
35
- <td><%= @package.file_source %></td>
36
- <td><%= @package.file_mode %></td>
37
- <td><%= @package.file_onwer %></td>
38
- <td><%= @package.file_group %></td>
35
+ <td><%= @foreman_packages_package.file_source %></td>
36
+ <td><%= @foreman_packages_package.file_mode %></td>
37
+ <td><%= @foreman_packages_package.file_onwer %></td>
38
+ <td><%= @foreman_packages_package.file_group %></td>
39
39
  </tr>
40
40
 
41
41
  <tr>
@@ -45,10 +45,10 @@
45
45
  <td><strong>service_ensure</strong></td>
46
46
  </tr>
47
47
  <tr>
48
- <td><%= @package.file_notify %></td>
49
- <td><%= @package.file_require %></td>
50
- <td><%= @package.service_name %></td>
51
- <td><%= @package.service_ensure %></td>
48
+ <td><%= @foreman_packages_package.file_notify %></td>
49
+ <td><%= @foreman_packages_package.file_require %></td>
50
+ <td><%= @foreman_packages_package.service_name %></td>
51
+ <td><%= @foreman_packages_package.service_ensure %></td>
52
52
  </tr>
53
53
 
54
54
  <tr>
@@ -58,10 +58,10 @@
58
58
  <td><strong>created_at</strong></td>
59
59
  </tr>
60
60
  <tr>
61
- <td><%= @package.service_enable %></td>
62
- <td><%= @package.service_hasstatus %></td>
63
- <td><%= @package.service_hasrestart %></td>
64
- <td><%= @package.created_at %></td>
61
+ <td><%= @foreman_packages_package.service_enable %></td>
62
+ <td><%= @foreman_packages_package.service_hasstatus %></td>
63
+ <td><%= @foreman_packages_package.service_hasrestart %></td>
64
+ <td><%= @foreman_packages_package.created_at %></td>
65
65
  </tr>
66
66
  </tbody>
67
67
  </table>
@@ -70,7 +70,7 @@
70
70
  <table class="table table-striped table-bordered">
71
71
  <thead></thead>
72
72
  <tbody>
73
- <%= @package.filename %>
73
+ <%= @foreman_packages_package.filename %>
74
74
  </tbody>
75
75
  </table>
76
76
  </div>
@@ -1,4 +1,4 @@
1
- <%= form_for :package, :html =>{:multipart => true} do |f| %>
1
+ <%= form_for :foreman_packages_package, :html =>{:multipart => true} do |f| %>
2
2
  <%= f.file_field :filename %>
3
3
  <%= f.submit "Upload" %>
4
4
  <% end %>
@@ -1,3 +1,3 @@
1
1
  module ForemanPackages
2
- VERSION = '0.0.18'
2
+ VERSION = '0.0.19'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_packages
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.18
4
+ version: 0.0.19
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: