lte-rails 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 00689d4136478568539c5326f36be78ef844e59a
4
- data.tar.gz: fbfd88a2589307148db0eca0ad941a9c1601526d
3
+ metadata.gz: a3bd9484610267c46182efeaf188f33fd23bbde4
4
+ data.tar.gz: f7bdd748ffa8992b8ba70a2ed3d91f73d8ced316
5
5
  SHA512:
6
- metadata.gz: 296df989ac762eb381b4ffc75e2460eaeec453165656c8ec5b775136a09cdd97dd59f2bd13e9b972d997a19a0f55cdb2196fec5dd4ce476150bc056f12fb2990
7
- data.tar.gz: eac660190e8e269cafab62c76d96c1a1b83c7702bd9452c8511ec49a3335bc353cacbb6841d18133beea2f0323cd288b6e66b1ac4ca0ed9e3b140dcdbbe71d9b
6
+ metadata.gz: b28771733ba6d6d549aa0c0c27738cb85084a719a91eaaa5cc396bb530fee955715705c56f23d88e6d57adb898cfd1c54ec4d7e95f805240c1affee860ba2d47
7
+ data.tar.gz: 5fac8944a54341f4c74b394350e6cb84c582def410c0999412ad4f75151096ca05578e33edafd8d5e480b5b93ba5b4c08bdf95fc6368c107d3540880c61d5984
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lte-rails (0.0.1)
4
+ lte-rails (0.0.2)
5
5
  less-rails (~> 2.6)
6
6
  less-rails-bootstrap (~> 3.3)
7
7
 
data/README.md CHANGED
@@ -1,4 +1,23 @@
1
- # admin-lte-rails
2
- Admin LTE gem for use in Rails
1
+ # AdminLTE gem for Rails
3
2
 
4
- Using AdminLTE 2.3.0
3
+ This is a gem for using the [AdminLTE](https://github.com/almasaeed2010/AdminLTE/issues) template within a Rails project.
4
+
5
+ This gem is currently using AvminLTE v2.3.0.
6
+
7
+ To use, add this to your Gemfile:
8
+ ```
9
+ gem 'lte-rails'
10
+ ```
11
+
12
+ and add this (changing the skin name to anything you want or adding more) to your application.css:
13
+
14
+ ```
15
+ *= require lte-rails
16
+ *= require AdminLTE/skins/skin-blue
17
+ ```
18
+
19
+ # Notes
20
+
21
+ This gem uses the main AdminLTE github repo to re-generate the gem from them by dynamically patching so that the assets work properly within the Rails environment.
22
+
23
+ This gem is not supporting the Javascript parts, yet.
data/Rakefile CHANGED
@@ -9,6 +9,12 @@ Bundler::GemHelper.install_tasks
9
9
  TARGET_DIR = 'vendor/assets/stylesheets'
10
10
  FULL_DIR = File.join(TARGET_DIR, "AdminLTE")
11
11
 
12
+ def replace_in_file(filename, source, replacement)
13
+ text = File.read(filename)
14
+ repl = text.gsub(source, replacement)
15
+ File.open(filename, 'w') { |f| f << repl }
16
+ end
17
+
12
18
  desc "Bundle the gem"
13
19
  task :bundle => [:bundle_install, :build_files] do
14
20
  sh 'gem build *.gemspec'
@@ -36,10 +42,10 @@ task :build_files => [:clean] do
36
42
  FileUtils.cp_r "AdminLTE/build/less/", TARGET_DIR, preserve: true
37
43
  Dir.chdir TARGET_DIR do
38
44
  FileUtils.mv 'less', "AdminLTE"
39
- file = "AdminLTE/AdminLTE.less"
40
- text = File.read(file)
41
- repl = text.gsub(/\.\.\/bootstrap-less\//, 'twitter/bootstrap/')
42
- File.open(file, 'w') { |f| f << repl }
45
+ replace_in_file("AdminLTE/AdminLTE.less", /\.\.\/bootstrap-less\//, 'twitter/bootstrap/')
46
+ Dir.glob("AdminLTE/skins/*.less").each do |f|
47
+ replace_in_file(f, /\.\.\/\.\.\/bootstrap-less\//, 'twitter/bootstrap/')
48
+ end
43
49
  end
44
50
  end
45
51
 
@@ -1,7 +1,7 @@
1
1
  module Lte
2
2
  module Rails
3
3
  # NOTE: this needs to be changed in the Makefile at the same time!
4
- VERSION = "0.0.1"
4
+ VERSION = "0.0.2"
5
5
  ADMIN_LTE_VERSION = "2.3.0"
6
6
  end
7
7
  end
@@ -2,8 +2,8 @@
2
2
  * Skin: Black
3
3
  * -----------
4
4
  */
5
- @import "../../bootstrap-less/mixins.less";
6
- @import "../../bootstrap-less/variables.less";
5
+ @import "twitter/bootstrap/mixins.less";
6
+ @import "twitter/bootstrap/variables.less";
7
7
  @import "../variables.less";
8
8
  @import "../mixins.less";
9
9
 
@@ -2,8 +2,8 @@
2
2
  * Skin: Black
3
3
  * -----------
4
4
  */
5
- @import "../../bootstrap-less/mixins.less";
6
- @import "../../bootstrap-less/variables.less";
5
+ @import "twitter/bootstrap/mixins.less";
6
+ @import "twitter/bootstrap/variables.less";
7
7
  @import "../variables.less";
8
8
  @import "../mixins.less";
9
9
 
@@ -2,8 +2,8 @@
2
2
  * Skin: Blue
3
3
  * ----------
4
4
  */
5
- @import "../../bootstrap-less/mixins.less";
6
- @import "../../bootstrap-less/variables.less";
5
+ @import "twitter/bootstrap/mixins.less";
6
+ @import "twitter/bootstrap/variables.less";
7
7
  @import "../variables.less";
8
8
  @import "../mixins.less";
9
9
 
@@ -2,8 +2,8 @@
2
2
  * Skin: Blue
3
3
  * ----------
4
4
  */
5
- @import "../../bootstrap-less/mixins.less";
6
- @import "../../bootstrap-less/variables.less";
5
+ @import "twitter/bootstrap/mixins.less";
6
+ @import "twitter/bootstrap/variables.less";
7
7
  @import "../variables.less";
8
8
  @import "../mixins.less";
9
9
 
@@ -3,8 +3,8 @@
3
3
  * -----------
4
4
  */
5
5
 
6
- @import "../../bootstrap-less/mixins.less";
7
- @import "../../bootstrap-less/variables.less";
6
+ @import "twitter/bootstrap/mixins.less";
7
+ @import "twitter/bootstrap/variables.less";
8
8
  @import "../variables.less";
9
9
  @import "../mixins.less";
10
10
 
@@ -3,8 +3,8 @@
3
3
  * -----------
4
4
  */
5
5
 
6
- @import "../../bootstrap-less/mixins.less";
7
- @import "../../bootstrap-less/variables.less";
6
+ @import "twitter/bootstrap/mixins.less";
7
+ @import "twitter/bootstrap/variables.less";
8
8
  @import "../variables.less";
9
9
  @import "../mixins.less";
10
10
 
@@ -3,8 +3,8 @@
3
3
  * ------------
4
4
  */
5
5
 
6
- @import "../../bootstrap-less/mixins.less";
7
- @import "../../bootstrap-less/variables.less";
6
+ @import "twitter/bootstrap/mixins.less";
7
+ @import "twitter/bootstrap/variables.less";
8
8
  @import "../variables.less";
9
9
  @import "../mixins.less";
10
10
 
@@ -3,8 +3,8 @@
3
3
  * ------------
4
4
  */
5
5
 
6
- @import "../../bootstrap-less/mixins.less";
7
- @import "../../bootstrap-less/variables.less";
6
+ @import "twitter/bootstrap/mixins.less";
7
+ @import "twitter/bootstrap/variables.less";
8
8
  @import "../variables.less";
9
9
  @import "../mixins.less";
10
10
 
@@ -3,8 +3,8 @@
3
3
  * ---------
4
4
  */
5
5
 
6
- @import "../../bootstrap-less/mixins.less";
7
- @import "../../bootstrap-less/variables.less";
6
+ @import "twitter/bootstrap/mixins.less";
7
+ @import "twitter/bootstrap/variables.less";
8
8
  @import "../variables.less";
9
9
  @import "../mixins.less";
10
10
 
@@ -3,8 +3,8 @@
3
3
  * ---------
4
4
  */
5
5
 
6
- @import "../../bootstrap-less/mixins.less";
7
- @import "../../bootstrap-less/variables.less";
6
+ @import "twitter/bootstrap/mixins.less";
7
+ @import "twitter/bootstrap/variables.less";
8
8
  @import "../variables.less";
9
9
  @import "../mixins.less";
10
10
 
@@ -3,8 +3,8 @@
3
3
  * ------------
4
4
  */
5
5
 
6
- @import "../../bootstrap-less/mixins.less";
7
- @import "../../bootstrap-less/variables.less";
6
+ @import "twitter/bootstrap/mixins.less";
7
+ @import "twitter/bootstrap/variables.less";
8
8
  @import "../variables.less";
9
9
  @import "../mixins.less";
10
10
 
@@ -3,8 +3,8 @@
3
3
  * ------------
4
4
  */
5
5
 
6
- @import "../../bootstrap-less/mixins.less";
7
- @import "../../bootstrap-less/variables.less";
6
+ @import "twitter/bootstrap/mixins.less";
7
+ @import "twitter/bootstrap/variables.less";
8
8
  @import "../variables.less";
9
9
  @import "../mixins.less";
10
10
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lte-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Puchol