Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4 1 stable #30

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ appraise 'spree-3-7' do
gem 'rails-controller-testing', '~> 1.0.2'
end

appraise "spree-4-1" do
gem 'spree', '~> 4.1'
gem 'rails-controller-testing', '~> 1.0.2'
end

appraise 'spree-master' do
gem 'spree', github: 'spree/spree', branch: 'master'
gem 'rails-controller-testing', '~> 1.0.2'
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Try Spree Html Invoice for Spree 3-4 with direct deployment on Heroku:

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/vinsol-spree-contrib/spree-demo-heroku/tree/spree-html-invoice-3-4)

Try Spree Html Invoice for Spree 4-1 with direct deployment on Heroku:

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/vinsol-spree-contrib/spree-demo-heroku/tree/spree-html-invoice-4-1)

Installation
------------

Expand Down
2 changes: 1 addition & 1 deletion app/views/spree/admin/invoice/_a4.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<title><%= Spree.t("#{params[:template]}.header") %></title>
</head>

<body>
<body onload="window.print()">
<div class="a4">
<div id="header">
<%= render "header" %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/spree/admin/invoice/receipt.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<title><%= Spree.t("#{params[:template]}.header") %></title>
</head>

<body onLoad="self.print()">
<body onload="window.print()">
<div class="receipt">
<div id="header">
<%= render "spree/admin/invoice/receipt_header" %>
Expand Down
8 changes: 8 additions & 0 deletions gemfiles/spree_4_1.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "spree", "~> 4.1"
gem "rails-controller-testing", "~> 1.0.2"

gemspec path: "../"
4 changes: 3 additions & 1 deletion lib/spree_html_invoice/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ class Engine < Rails::Engine
config.autoload_paths += %W(#{config.root}/lib)

initializer "spree_html_invoice.assets.precompile", :after => "spree.assets.precompile" do |app|
app.config.assets.precompile += [ "admin/html-invoice.css", "admin/html-receipt.css" ]
app.config.assets.precompile += [ "admin/html-invoice.css", "admin/html-receipt.css", Spree::HtmlInvoice::Config[:html_invoice_logo_path] ]
end

initializer "spree.spree_html_invoice.preferences", before: :load_config_initializers, :after => "spree.environment" do |app|
Spree::HtmlInvoice::Config = Spree::HtmlInvoiceConfiguration.new
Spree::HtmlInvoice::Config[:html_invoice_logo_path] = Spree::Config[:logo]
Spree::HtmlInvoice::Config.set(print_buttons: "invoice,packaging_slip")
end

def self.activate
Expand Down
30 changes: 15 additions & 15 deletions spree_html_invoice.gemspec
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = 'spree_html_invoice'
s.version = '3.4.0'
s.version = '4.1'
s.summary = 'Print invoices from a spree order'
s.required_ruby_version = '>= 2.2.7'
s.required_ruby_version = '>= 2.5'
s.authors = ["Torsten Ruger", "Chandramohan Rangaswamy"]

s.files = Dir['README.markdown', 'lib/**/*', 'app/**/*', 'config/*']
s.require_path = 'lib'
s.requirements << 'none'
spree_version = '>= 4.1'

s.has_rdoc = true

s.add_dependency 'spree_core', '>= 3.2.0', '< 4.0'
s.add_dependency 'spree_core'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets discuss

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets discuss


s.add_development_dependency 'appraisal'
s.add_development_dependency 'capybara', '~> 2.6'
s.add_development_dependency 'database_cleaner'
s.add_development_dependency 'factory_bot', '~> 4.8.2'
s.add_development_dependency 'ffaker'
s.add_development_dependency 'rspec-rails', '~> 3.4'
s.add_development_dependency 'simplecov'
s.add_development_dependency 'sqlite3'
s.add_development_dependency 'coffee-rails'
s.add_development_dependency 'capybara', '~> 3.32'
s.add_development_dependency 'database_cleaner', '~> 1.8.5'
s.add_development_dependency 'factory_bot', '~> 5.2'
s.add_development_dependency 'ffaker', '~> 2.2'
s.add_development_dependency 'rspec-rails', '~> 4.0', '>= 4.0.1'
s.add_development_dependency 'simplecov', '~> 0.18.5'
s.add_development_dependency 'sqlite3', '~> 1.4'
s.add_development_dependency 'coffee-rails', '~> 5.0'
s.add_development_dependency 'rails-controller-testing'
s.add_development_dependency 'rspec-activemodel-mocks'
s.add_development_dependency 'sass-rails'
s.add_development_dependency 'selenium-webdriver'
s.add_development_dependency 'sass-rails', '~> 6.0'
s.add_development_dependency 'selenium-webdriver', '~> 3.142', '>= 3.142.7'
s.add_development_dependency 'shoulda-matchers'
end